------------------------------------------------------------------------------------------------------------------------
      name:  rep
       log:  /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict project/Analysis/Video_Ana
> lysis/Replication data - PSRM/output/replication_clean.log
  log type:  text
 opened on:   3 Dec 2025, 14:33:33
r; t=0.00 14:33:33

. *--------------------------------------------------------------
. * Data input
. *--------------------------------------------------------------
. 
. import delimited "${data}/final_data.csv", bindquote(strict) varnames(1) maxquotedrows(100) clear
(encoding automatically selected: UTF-8)
(49 vars, 5,438 obs)
r; t=0.23 14:33:34

. 
. *** Pre-treatment variables
. 
.  ***-------------------------------
. *** Clean data for use
. ***-------------------------------
. // The first part will no 
. 
. label def c 1 "no" 2 "yes"
r; t=0.00 14:33:34

. label val consent c
r; t=0.00 14:33:34

. keep if consent==2
(429 observations deleted)
r; t=0.00 14:33:34

. keep if study=="main study"
(397 observations deleted)
r; t=0.00 14:33:34

. ***-------------------------------
. *** RECODE KEY VARIABLES
. ***-------------------------------
. 
. ** Gender
. tab gender 

    gender  |      Freq.     Percent        Cum.
------------+-----------------------------------
         -1 |        142        3.74        3.74
          1 |      2,416       63.63       67.37
          2 |      1,239       32.63      100.00
------------+-----------------------------------
      Total |      3,797      100.00
r; t=0.00 14:33:34

. recode gender (1=0 "male") (2=1 "female") (-1=.a), gen(female)
(3,797 differences between gender and female)
r; t=0.00 14:33:34

. label var female "female"
r; t=0.00 14:33:34

. fre female

female -- female
---------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
------------------+--------------------------------------------
Valid   0  male   |       2416      52.39      66.10      66.10
        1  female |       1239      26.86      33.90     100.00
        Total     |       3655      79.25     100.00           
Missing .         |        815      17.67                      
        .a        |        142       3.08                      
        Total     |        957      20.75                      
Total             |       4612     100.00                      
---------------------------------------------------------------
r; t=0.04 14:33:34

. **Age
. tab age_1

     age _1 |      Freq.     Percent        Cum.
------------+-----------------------------------
         17 |         74        1.94        1.94
         18 |        151        3.96        5.90
         19 |        187        4.90       10.81
         20 |        256        6.71       17.52
         21 |        194        5.09       22.61
         22 |        253        6.64       29.24
         23 |        197        5.17       34.41
         24 |        228        5.98       40.39
         25 |        193        5.06       45.45
         26 |        170        4.46       49.91
         27 |        155        4.07       53.97
         28 |        130        3.41       57.38
         29 |        121        3.17       60.56
         30 |        142        3.72       64.28
         31 |         89        2.33       66.61
         32 |         82        2.15       68.76
         33 |         65        1.70       70.47
         34 |         70        1.84       72.31
         35 |         71        1.86       74.17
         36 |         48        1.26       75.43
         37 |         56        1.47       76.89
         38 |         55        1.44       78.34
         39 |         48        1.26       79.60
         40 |         62        1.63       81.22
         41 |         29        0.76       81.98
         42 |         56        1.47       83.45
         43 |         39        1.02       84.47
         44 |         41        1.08       85.55
         45 |         43        1.13       86.68
         46 |         52        1.36       88.04
         47 |         39        1.02       89.06
         48 |         16        0.42       89.48
         49 |         32        0.84       90.32
         50 |         46        1.21       91.53
         51 |         20        0.52       92.05
         52 |         41        1.08       93.13
         53 |         14        0.37       93.50
         54 |         17        0.45       93.94
         55 |         22        0.58       94.52
         56 |         21        0.55       95.07
         57 |         21        0.55       95.62
         58 |         14        0.37       95.99
         59 |         12        0.31       96.30
         60 |         20        0.52       96.83
         61 |          8        0.21       97.04
         62 |         19        0.50       97.53
         63 |         13        0.34       97.88
         64 |         13        0.34       98.22
         65 |         14        0.37       98.58
         66 |          5        0.13       98.71
         67 |          5        0.13       98.85
         68 |          7        0.18       99.03
         69 |          3        0.08       99.11
         70 |          5        0.13       99.24
         71 |          1        0.03       99.27
         72 |          4        0.10       99.37
         73 |          2        0.05       99.42
         74 |          3        0.08       99.50
         75 |          1        0.03       99.53
         76 |          2        0.05       99.58
         77 |          2        0.05       99.63
         85 |          1        0.03       99.66
         88 |          1        0.03       99.69
         93 |          1        0.03       99.71
         96 |          1        0.03       99.74
         97 |          1        0.03       99.76
         98 |          1        0.03       99.79
         99 |          8        0.21      100.00
------------+-----------------------------------
      Total |      3,813      100.00
r; t=0.00 14:33:34

. rename age_1 age
r; t=0.08 14:33:34

. label var age "age"
r; t=0.00 14:33:34

. *preserve
. keep if age>17
(74 observations deleted)
r; t=0.00 14:33:34

. tab age

        age |      Freq.     Percent        Cum.
------------+-----------------------------------
         18 |        151        4.04        4.04
         19 |        187        5.00        9.04
         20 |        256        6.85       15.89
         21 |        194        5.19       21.08
         22 |        253        6.77       27.84
         23 |        197        5.27       33.11
         24 |        228        6.10       39.21
         25 |        193        5.16       44.37
         26 |        170        4.55       48.92
         27 |        155        4.15       53.06
         28 |        130        3.48       56.54
         29 |        121        3.24       59.78
         30 |        142        3.80       63.57
         31 |         89        2.38       65.95
         32 |         82        2.19       68.15
         33 |         65        1.74       69.88
         34 |         70        1.87       71.76
         35 |         71        1.90       73.66
         36 |         48        1.28       74.94
         37 |         56        1.50       76.44
         38 |         55        1.47       77.91
         39 |         48        1.28       79.19
         40 |         62        1.66       80.85
         41 |         29        0.78       81.63
         42 |         56        1.50       83.12
         43 |         39        1.04       84.17
         44 |         41        1.10       85.26
         45 |         43        1.15       86.41
         46 |         52        1.39       87.80
         47 |         39        1.04       88.85
         48 |         16        0.43       89.28
         49 |         32        0.86       90.13
         50 |         46        1.23       91.36
         51 |         20        0.53       91.90
         52 |         41        1.10       92.99
         53 |         14        0.37       93.37
         54 |         17        0.45       93.82
         55 |         22        0.59       94.41
         56 |         21        0.56       94.97
         57 |         21        0.56       95.53
         58 |         14        0.37       95.91
         59 |         12        0.32       96.23
         60 |         20        0.53       96.76
         61 |          8        0.21       96.98
         62 |         19        0.51       97.49
         63 |         13        0.35       97.83
         64 |         13        0.35       98.18
         65 |         14        0.37       98.56
         66 |          5        0.13       98.69
         67 |          5        0.13       98.82
         68 |          7        0.19       99.01
         69 |          3        0.08       99.09
         70 |          5        0.13       99.22
         71 |          1        0.03       99.25
         72 |          4        0.11       99.36
         73 |          2        0.05       99.41
         74 |          3        0.08       99.49
         75 |          1        0.03       99.52
         76 |          2        0.05       99.57
         77 |          2        0.05       99.63
         85 |          1        0.03       99.65
         88 |          1        0.03       99.68
         93 |          1        0.03       99.71
         96 |          1        0.03       99.73
         97 |          1        0.03       99.76
         98 |          1        0.03       99.79
         99 |          8        0.21      100.00
------------+-----------------------------------
      Total |      3,739      100.00
r; t=0.00 14:33:34

. 
. * Generate age-groups
. recode age (18/25=1 "18-25")(26/35=2 "26-35")(36/45=3 "36-45")(46/55=4 "46-55")(56/100 =5 "56 and above"), ge(age_grou
> ps)
(3,739 differences between age and age_groups)
r; t=0.00 14:33:34

. ta age_groups

   RECODE of |
   age (age) |      Freq.     Percent        Cum.
-------------+-----------------------------------
       18-25 |      1,659       44.37       44.37
       26-35 |      1,095       29.29       73.66
       36-45 |        477       12.76       86.41
       46-55 |        299        8.00       94.41
56 and above |        209        5.59      100.00
-------------+-----------------------------------
       Total |      3,739      100.00
r; t=0.00 14:33:34

. 
. ** Education
. fre education

education -- education 
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        130       2.86       3.51       3.51
        1     |         85       1.87       2.29       5.80
        2     |         26       0.57       0.70       6.50
        3     |        229       5.05       6.18      12.68
        4     |        430       9.48      11.60      24.28
        5     |        151       3.33       4.07      28.36
        6     |        817      18.00      22.05      50.40
        7     |        383       8.44      10.33      60.74
        8     |       1455      32.06      39.26     100.00
        Total |       3706      81.67     100.00           
Missing .     |        832      18.33                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. label def ed 1 "No formal education" 2 "Pre-school (kindergarden)" 3 "Post-primary (general)" 4 "post-primary (technic
> al and vocational)" 5 "Post-primary professional" 6 "secondary school (general)" 7 "secondary (technical and vocationa
> l)" 8 "University" 
r; t=0.00 14:33:34

. 
. label val education ed
r; t=0.00 14:33:34

. recode education (1/2=1 "Below primary") (3/5=2 "Primary") (6/7=3 "Secondary") (8=4 "University") (-1=.), gen(educ_new
> )
(3,621 differences between education and educ_new)
r; t=0.00 14:33:34

. label var educ_new "education_new"
r; t=0.00 14:33:34

. ta educ_new

education_new |      Freq.     Percent        Cum.
--------------+-----------------------------------
Below primary |        111        3.10        3.10
      Primary |        810       22.65       25.76
    Secondary |      1,200       33.56       59.31
   University |      1,455       40.69      100.00
--------------+-----------------------------------
        Total |      3,576      100.00
r; t=0.00 14:33:34

. 
. ** Religion
. tab religion

  religion  |      Freq.     Percent        Cum.
------------+-----------------------------------
         -1 |         56        1.55        1.55
          1 |      1,648       45.71       47.27
          2 |      1,067       29.60       76.87
          3 |        543       15.06       91.93
          4 |        176        4.88       96.81
          5 |        115        3.19      100.00
------------+-----------------------------------
      Total |      3,605      100.00
r; t=0.00 14:33:34

. label def re 1 "Muslim (islam)" 2 "Catholic" 3 "Protestant" 4 "traditional/ethnic religion" 5 "none"
r; t=0.00 14:33:34

. recode religion (1=1 "Muslism")(2=2 "Catholic")(3=3 "protestant")(4/5=4 "others")(-1=.), ge(reli_new)
(171 differences between religion and reli_new)
r; t=0.00 14:33:34

. label var reli_new "religion_new"
r; t=0.00 14:33:34

. fre reli_new

reli_new -- religion_new
------------------------------------------------------------------
                     |      Freq.    Percent      Valid       Cum.
---------------------+--------------------------------------------
Valid   1 Muslism    |       1648      36.32      46.44      46.44
        2 Catholic   |       1067      23.51      30.06      76.50
        3 protestant |        543      11.97      15.30      91.80
        4 others     |        291       6.41       8.20     100.00
        Total        |       3549      78.21     100.00           
Missing .            |        989      21.79                      
Total                |       4538     100.00                      
------------------------------------------------------------------
r; t=0.00 14:33:34

. *recode for descriptive statistics
. recode religion (-1=.), ge(religion_new)
(56 differences between religion and religion_new)
r; t=0.00 14:33:34

. label val religion_new re 
r; t=0.00 14:33:34

. fre religion_new

religion_new -- RECODE of religion (religion )
-----------------------------------------------------------------------------------
                                      |      Freq.    Percent      Valid       Cum.
--------------------------------------+--------------------------------------------
Valid   1 Muslim (islam)              |       1648      36.32      46.44      46.44
        2 Catholic                    |       1067      23.51      30.06      76.50
        3 Protestant                  |        543      11.97      15.30      91.80
        4 traditional/ethnic religion |        176       3.88       4.96      96.76
        5 none                        |        115       2.53       3.24     100.00
        Total                         |       3549      78.21     100.00           
Missing .                             |        989      21.79                      
Total                                 |       4538     100.00                      
-----------------------------------------------------------------------------------
r; t=0.00 14:33:34

. 
. ** Ethnicity
. tab ethnicity

 ethnicity  |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,886       52.13       52.13
          2 |        131        3.62       55.75
          3 |        139        3.84       59.59
          4 |        221        6.11       65.70
          5 |        205        5.67       71.37
          6 |      1,036       28.63      100.00
------------+-----------------------------------
      Total |      3,618      100.00
r; t=0.00 14:33:34

. label def et 1 "Mossi" 2 "Fula (peulh)" 3 "Bobo" 4 "Gurma" 5 "Gurunsi" 6 "Other"
r; t=0.00 14:33:34

. label val ethnicity et
r; t=0.00 14:33:34

. ta ethnicity

  ethnicity  |      Freq.     Percent        Cum.
-------------+-----------------------------------
       Mossi |      1,886       52.13       52.13
Fula (peulh) |        131        3.62       55.75
        Bobo |        139        3.84       59.59
       Gurma |        221        6.11       65.70
     Gurunsi |        205        5.67       71.37
       Other |      1,036       28.63      100.00
-------------+-----------------------------------
       Total |      3,618      100.00
r; t=0.00 14:33:34

. recode ethnicity (1=1 "Mossi")(2=2 "Fula")(3=3 "Bobo")(4=4 "Gurma")(5=5 "Gurunsi")(6=6 "Other"), ge(ethnicity_new)
(0 differences between ethnicity and ethnicity_new)
r; t=0.00 14:33:34

. label var ethnicity_new "ethnicity"
r; t=0.00 14:33:34

. 
. ** Province/town
. ta province_1

 province _ |
          1 |      Freq.     Percent        Cum.
------------+-----------------------------------
       Bale |         27        0.77        0.77
        Bam |         10        0.28        1.05
      Banwa |         13        0.37        1.42
     Bazega |          9        0.26        1.68
 Bougouriba |          2        0.06        1.73
    Boulgou |         56        1.59        3.33
 Boulkiemde |        143        4.07        7.39
      Comoe |         50        1.42        8.81
 Ganzourgou |         12        0.34        9.16
     Gnagna |          9        0.26        9.41
     Gourma |         68        1.93       11.34
      Houet |        768       21.84       33.18
       Ioba |          9        0.26       33.44
    Kadiogo |      1,856       52.77       86.21
 Kenedougou |         31        0.88       87.09
  Kompienga |          3        0.09       87.18
      Kossi |         21        0.60       87.77
 Koulpelogo |         18        0.51       88.29
Kourittenga |         32        0.91       89.20
  Kourweogo |          5        0.14       89.34
     Leraba |          4        0.11       89.45
     Loroum |          3        0.09       89.54
    Mouhoun |         65        1.85       91.38
    Nahouri |          8        0.23       91.61
 Namentenga |         13        0.37       91.98
     Nayala |          7        0.20       92.18
   Noumbiel |          3        0.09       92.27
 Oubritenga |         19        0.54       92.81
    Oudalan |          2        0.06       92.86
    Passore |          3        0.09       92.95
       Poni |         15        0.43       93.38
    Sanguie |         15        0.43       93.80
 Sanmatenga |         47        1.34       95.14
       Seno |         12        0.34       95.48
    Sissili |         10        0.28       95.76
       Soum |          2        0.06       95.82
     Sourou |         15        0.43       96.25
      Tapoa |          8        0.23       96.47
        Tuy |         13        0.37       96.84
      Yagha |          2        0.06       96.90
    Yatenga |         83        2.36       99.26
       Ziro |          6        0.17       99.43
    Zondoma |          7        0.20       99.63
 Zoundweogo |         13        0.37      100.00
------------+-----------------------------------
      Total |      3,517      100.00
r; t=0.00 14:33:34

. ta province_2

      province _2 |      Freq.     Percent        Cum.
------------------+-----------------------------------
         Ambsouya |          3        0.09        0.09
       Andemtenga |          2        0.06        0.14
          Bagassi |          3        0.09        0.23
            Bagre |          2        0.06        0.28
             Bahn |          1        0.03        0.31
           Bakata |          1        0.03        0.34
           Balave |          1        0.03        0.37
             Bama |          6        0.17        0.54
             Bana |          1        0.03        0.57
          Banfora |         43        1.22        1.79
           Banzon |          3        0.09        1.88
           Barani |          3        0.09        1.96
       Barsalogho |          3        0.09        2.05
            Batie |          1        0.03        2.08
          Beguedo |          4        0.11        2.19
           Bereba |          1        0.03        2.22
     Beregadougou |          2        0.06        2.27
          Bilanga |          1        0.03        2.30
            Binde |          2        0.06        2.36
            Bingo |          1        0.03        2.39
          Bissiga |          3        0.09        2.47
            Bitou |          3        0.09        2.56
            Boala |          2        0.06        2.62
   Bobo-Dioulasso |        753       21.41       24.03
          Bogande |          5        0.14       24.17
       Bomborokui |          2        0.06       24.23
         Bondokui |          4        0.11       24.34
           Boromo |         14        0.40       24.74
            Botou |          1        0.03       24.77
           Boudri |          4        0.11       24.88
       Bougnounou |          3        0.09       24.96
           Boulsa |          8        0.23       25.19
  Bouroum-Bouroum |          1        0.03       25.22
        Bourzanga |          1        0.03       25.25
           Bousse |          3        0.09       25.33
          Boussou |          3        0.09       25.42
    Boussou-Koula |          1        0.03       25.45
             Dano |          4        0.11       25.56
            Dassa |          1        0.03       25.59
         Dedougou |         55        1.56       27.15
               Di |          2        0.06       27.21
            Diabo |          7        0.20       27.41
         Dialgaye |          1        0.03       27.44
          Diapaga |          4        0.11       27.55
        Diapangou |          2        0.06       27.61
        Diebougou |          1        0.03       27.64
          Dissihn |          3        0.09       27.72
         Djibasso |          3        0.09       27.81
            Djibo |          2        0.06       27.86
            Dokui |          1        0.03       27.89
             Dori |          9        0.26       28.15
        Doulougou |          1        0.03       28.18
         Doumbala |          1        0.03       28.21
         Douroula |          2        0.06       28.26
     Fada-Ngourma |         58        1.65       29.91
      Falagountou |          1        0.03       29.94
             Fara |          2        0.06       30.00
          Founzan |          2        0.06       30.05
            Gaoua |          9        0.26       30.31
          Garango |          7        0.20       30.51
           Gassan |          1        0.03       30.54
        Gbomblora |          1        0.03       30.57
             Gogo |          1        0.03       30.59
         Gorgadji |          1        0.03       30.62
      Gorom-Gorom |          2        0.06       30.68
         Gounguen |          2        0.06       30.74
           Goursi |          3        0.09       30.82
         Gueguere |          1        0.03       30.85
           Guiaro |          1        0.03       30.88
          Guibare |          1        0.03       30.91
           Hounde |          7        0.20       31.11
          Imasgho |          1        0.03       31.13
          Kalsaka |          1        0.03       31.16
           Kampti |          1        0.03       31.19
            Kando |          3        0.09       31.28
          Kangala |          1        0.03       31.31
        Kankalaba |          1        0.03       31.33
        Kantchari |          1        0.03       31.36
Karangasso-Sambla |          2        0.06       31.42
 Karangasso-Vigue |          1        0.03       31.45
             Kaya |         40        1.14       32.58
            Kayan |          1        0.03       32.61
            Kayao |          1        0.03       32.64
            Kindi |          1        0.03       32.67
         Kokologo |          2        0.06       32.73
           Koloko |          4        0.11       32.84
       Kombissiri |          4        0.11       32.95
      Komin-Yanga |          3        0.09       33.04
      Komki-Ipala |         11        0.31       33.35
        Kompienga |          1        0.03       33.38
         Komsilga |         20        0.57       33.95
        Kongoussi |          7        0.20       34.15
        Korsimoro |          2        0.06       34.21
         Kossouka |          1        0.03       34.23
             Koti |          1        0.03       34.26
           Koubri |         10        0.28       34.55
        Koudougou |        129        3.67       38.21
            Kouka |          3        0.09       38.30
          Koumbia |          2        0.06       38.36
          Koumbri |          2        0.06       38.41
          Koupela |         16        0.45       38.87
         Kourouma |          3        0.09       38.95
             Kyon |          1        0.03       38.98
         La-Toden |          2        0.06       39.04
          Lalgaye |          5        0.14       39.18
         Lanfiera |          1        0.03       39.21
          Lankoue |          2        0.06       39.27
          Legmoin |          1        0.03       39.29
             Lena |          2        0.06       39.35
              Leo |          8        0.23       39.58
          Loumana |          2        0.06       39.64
         Madjoari |          1        0.03       39.66
            Malba |          2        0.06       39.72
            Manga |          9        0.26       39.98
        Mangodara |          1        0.03       40.01
             Mani |          2        0.06       40.06
          Mogtedo |          3        0.09       40.15
             Nako |          1        0.03       40.18
          Namouno |          1        0.03       40.20
         Nandiala |          1        0.03       40.23
           Nanoro |          2        0.06       40.29
          Nassere |          1        0.03       40.32
          Ndorola |          2        0.06       40.38
         Niabouri |          2        0.06       40.43
             Niou |          1        0.03       40.46
           Nobere |          1        0.03       40.49
            Nouna |         11        0.31       40.80
          Orodara |         13        0.37       41.17
          Oronkua |          1        0.03       41.20
      Ouagadougou |      1,731       49.22       90.42
       Ouahigouya |         76        2.16       92.58
         Ouargaye |          1        0.03       92.61
             Oula |          1        0.03       92.64
    Ourgou-Manega |          1        0.03       92.66
               Pa |          3        0.09       92.75
            Pabre |         10        0.28       93.03
             Pama |          1        0.03       93.06
             Peni |          1        0.03       93.09
            Piela |          1        0.03       93.12
          Pissila |          2        0.06       93.18
               Po |          5        0.14       93.32
              Poa |          3        0.09       93.40
           Pompoï |          1        0.03       93.43
            Pouni |          1        0.03       93.46
            Poura |          1        0.03       93.49
        Pouytenga |          8        0.23       93.72
            Rambo |          1        0.03       93.74
              Reo |         10        0.28       94.03
            Saaba |         57        1.62       95.65
            Sabou |          1        0.03       95.68
           Safane |          1        0.03       95.71
             Sami |          2        0.06       95.76
      Samogogouan |          1        0.03       95.79
       Samogoyiri |          2        0.06       95.85
           Sanaba |          2        0.06       95.91
           Sangha |          1        0.03       95.93
           Sapone |          2        0.06       95.99
           Sapouy |          2        0.06       96.05
            Sebba |          2        0.06       96.10
       Senguenega |          1        0.03       96.13
         Seytenga |          1        0.03       96.16
             Siby |          1        0.03       96.19
     Sideradougou |          1        0.03       96.22
            Sindo |          1        0.03       96.25
           Sindou |          1        0.03       96.28
          Solenzo |          5        0.14       96.42
        Soudougui |          1        0.03       96.45
          Sourgou |          2        0.06       96.50
          Tambaga |          1        0.03       96.53
 Tanguin-Dassouri |         17        0.48       97.01
         Tcheriba |          3        0.09       97.10
           Tenado |          2        0.06       97.16
        Tenkodogo |         32        0.91       98.07
        Tiankoura |          1        0.03       98.09
          Tiebele |          1        0.03       98.12
          Tiefora |          3        0.09       98.21
            Titao |          2        0.06       98.27
            Toece |          1        0.03       98.29
          Toeguen |          1        0.03       98.32
             Toma |          6        0.17       98.49
           Tougan |         10        0.28       98.78
            Tougo |          1        0.03       98.81
         Tougouri |          1        0.03       98.83
        Toussiana |          3        0.09       98.92
             Yaho |          1        0.03       98.95
             Yako |          1        0.03       98.98
            Yamba |          1        0.03       99.00
       Yargatenga |          7        0.20       99.20
            Zabre |          4        0.11       99.32
              Zam |          2        0.06       99.37
            Zecco |          1        0.03       99.40
      Zeguedeguen |          2        0.06       99.46
          Ziniare |         15        0.43       99.89
            Zonse |          1        0.03       99.91
           Zorgho |          3        0.09      100.00
------------------+-----------------------------------
            Total |      3,517      100.00
r; t=0.00 14:33:34

. 
. ge city=q38_2
(4,254 missing values generated)
r; t=0.00 14:33:34

. replace city=province_2 if missing(city)
variable city was str16 now str17
(3,233 real changes made)
r; t=0.00 14:33:34

. ta city

             city |      Freq.     Percent        Cum.
------------------+-----------------------------------
         Ambsouya |          1        0.03        0.03
       Andemtenga |          2        0.06        0.09
          Bagassi |          3        0.09        0.17
            Bagre |          3        0.09        0.26
             Bahn |          1        0.03        0.28
           Bakata |          1        0.03        0.31
           Balave |          3        0.09        0.40
             Bama |          3        0.09        0.48
             Bana |          2        0.06        0.54
          Banfora |         43        1.22        1.76
           Banzon |          3        0.09        1.85
           Barani |          3        0.09        1.93
       Barsalogho |          3        0.09        2.02
            Batie |          2        0.06        2.08
          Beguedo |          5        0.14        2.22
           Bereba |          1        0.03        2.25
     Beregadougou |          2        0.06        2.30
          Bilanga |          1        0.03        2.33
            Binde |          1        0.03        2.36
            Bingo |          1        0.03        2.39
          Bissiga |          3        0.09        2.47
            Bitou |          3        0.09        2.56
            Boala |          2        0.06        2.62
   Bobo-Dioulasso |        741       21.07       23.68
          Bogande |          4        0.11       23.80
       Bomborokui |          2        0.06       23.86
         Bondokui |          3        0.09       23.94
           Boromo |         17        0.48       24.42
            Botou |          1        0.03       24.45
           Boudri |          4        0.11       24.57
       Bougnounou |          2        0.06       24.62
           Boulsa |          9        0.26       24.88
        Bourzanga |          2        0.06       24.94
           Bousse |          2        0.06       24.99
          Boussou |          3        0.09       25.08
    Boussou-Koula |          1        0.03       25.11
             Dano |          5        0.14       25.25
            Dassa |          1        0.03       25.28
         Dedougou |         58        1.65       26.93
               Di |          2        0.06       26.98
            Diabo |          7        0.20       27.18
         Dialgaye |          1        0.03       27.21
          Diapaga |          3        0.09       27.30
        Diapangou |          2        0.06       27.35
        Diebougou |          3        0.09       27.44
          Dissihn |          4        0.11       27.55
         Djibasso |          3        0.09       27.64
            Djibo |          3        0.09       27.72
             Dori |         10        0.28       28.01
        Doulougou |          1        0.03       28.04
         Doumbala |          1        0.03       28.06
         Douroula |          2        0.06       28.12
        Dourtenga |          1        0.03       28.15
     Fada-Ngourma |         56        1.59       29.74
      Falagountou |          1        0.03       29.77
             Fara |          1        0.03       29.80
          Founzan |          2        0.06       29.85
            Gaoua |          9        0.26       30.11
          Garango |          7        0.20       30.31
           Gassan |          1        0.03       30.34
        Gbomblora |          1        0.03       30.37
       Gbondjigui |          1        0.03       30.40
             Gogo |          1        0.03       30.42
          Gomboro |          1        0.03       30.45
         Gorgadji |          1        0.03       30.48
      Gorom-Gorom |          3        0.09       30.57
          Gossina |          1        0.03       30.59
         Gounguen |          1        0.03       30.62
           Goursi |          3        0.09       30.71
         Gueguere |          1        0.03       30.74
           Guiaro |          1        0.03       30.76
          Guibare |          1        0.03       30.79
           Hounde |          8        0.23       31.02
          Imasgho |          1        0.03       31.05
          Kalsaka |          1        0.03       31.08
            Kando |          3        0.09       31.16
          Kangala |          1        0.03       31.19
        Kankalaba |          1        0.03       31.22
        Kantchari |          1        0.03       31.25
Karangasso-Sambla |          2        0.06       31.31
 Karangasso-Vigue |          1        0.03       31.33
             Kaya |         40        1.14       32.47
            Kayan |          1        0.03       32.50
            Kayao |          1        0.03       32.53
             Kaïn |          1        0.03       32.56
            Kindi |          1        0.03       32.58
         Kokologo |          3        0.09       32.67
           Koloko |          4        0.11       32.78
       Kombissiri |          4        0.11       32.90
      Komin-Yanga |          3        0.09       32.98
      Komki-Ipala |         12        0.34       33.32
        Kompienga |          1        0.03       33.35
         Komsilga |         18        0.51       33.86
             Kona |          1        0.03       33.89
        Kongoussi |          6        0.17       34.06
        Korsimoro |          2        0.06       34.12
           Koubri |         11        0.31       34.43
        Koudougou |        131        3.72       38.16
            Kouka |          1        0.03       38.19
          Koumbia |          1        0.03       38.21
          Koumbri |          3        0.09       38.30
          Koupela |         19        0.54       38.84
         Kourouma |          2        0.06       38.90
         La-Toden |          2        0.06       38.95
          Lalgaye |          5        0.14       39.10
         Lanfiera |          2        0.06       39.15
          Lankoue |          2        0.06       39.21
          Legmoin |          1        0.03       39.24
             Lena |          2        0.06       39.29
              Leo |          8        0.23       39.52
          Loumana |          1        0.03       39.55
         Madjoari |          1        0.03       39.58
            Malba |          1        0.03       39.61
            Manga |         10        0.28       39.89
        Mangodara |          1        0.03       39.92
             Mani |          2        0.06       39.98
          Mogtedo |          3        0.09       40.06
             Nako |          1        0.03       40.09
          Namouno |          1        0.03       40.12
         Nandiala |          1        0.03       40.15
           Nanoro |          1        0.03       40.18
          Nassere |          1        0.03       40.20
          Ndorola |          1        0.03       40.23
         Niabouri |          2        0.06       40.29
       Niangoloko |          1        0.03       40.32
            Nouna |         12        0.34       40.66
          Orodara |         12        0.34       41.00
          Oronkua |          1        0.03       41.03
      Ouagadougou |      1,732       49.25       90.28
       Ouahigouya |         74        2.10       92.38
         Ouargaye |          1        0.03       92.41
           Ouessa |          1        0.03       92.44
             Oula |          1        0.03       92.47
    Ourgou-Manega |          1        0.03       92.49
               Pa |          4        0.11       92.61
            Pabre |         10        0.28       92.89
             Pama |          1        0.03       92.92
             Peni |          1        0.03       92.95
          Pissila |          2        0.06       93.01
               Po |          4        0.11       93.12
              Poa |          3        0.09       93.20
            Pouni |          1        0.03       93.23
            Poura |          1        0.03       93.26
        Pouytenga |          7        0.20       93.46
            Rambo |          1        0.03       93.49
              Reo |          8        0.23       93.72
            Saaba |         63        1.79       95.51
            Sabou |          2        0.06       95.56
            Sabse |          1        0.03       95.59
           Safane |          1        0.03       95.62
             Sami |          1        0.03       95.65
      Samogogouan |          1        0.03       95.68
       Samogoyiri |          2        0.06       95.74
           Sanaba |          3        0.09       95.82
           Sangha |          1        0.03       95.85
           Sapone |          1        0.03       95.88
           Sapouy |          3        0.09       95.96
            Sebba |          1        0.03       95.99
       Senguenega |          1        0.03       96.02
         Seytenga |          1        0.03       96.05
             Siby |          1        0.03       96.08
     Sideradougou |          2        0.06       96.13
            Sindo |          2        0.06       96.19
           Sindou |          1        0.03       96.22
          Solenzo |          6        0.17       96.39
           Solhan |          1        0.03       96.42
        Soudougui |          1        0.03       96.45
          Sourgou |          1        0.03       96.47
          Tambaga |          1        0.03       96.50
 Tanguin-Dassouri |         17        0.48       96.99
         Tcheriba |          3        0.09       97.07
           Tenado |          1        0.03       97.10
        Tenkodogo |         37        1.05       98.15
        Tiankoura |          1        0.03       98.18
          Tiebele |          1        0.03       98.21
          Tiefora |          3        0.09       98.29
            Titao |          2        0.06       98.35
            Toece |          1        0.03       98.38
          Toeguen |          1        0.03       98.41
             Toma |          6        0.17       98.58
           Tougan |         11        0.31       98.89
         Tougouri |          2        0.06       98.95
        Toussiana |          2        0.06       99.00
             Yaho |          1        0.03       99.03
             Yako |          1        0.03       99.06
            Yamba |          1        0.03       99.09
       Yargatenga |          5        0.14       99.23
            Zabre |          4        0.11       99.35
              Zam |          2        0.06       99.40
            Zecco |          1        0.03       99.43
      Zeguedeguen |          1        0.03       99.46
             Ziga |          1        0.03       99.49
         Zimtanga |          1        0.03       99.52
          Ziniare |         14        0.40       99.91
            Zonse |          1        0.03       99.94
           Zorgho |          2        0.06      100.00
------------------+-----------------------------------
            Total |      3,517      100.00
r; t=0.00 14:33:34

. 
. 
. ** Important democracy
. *label def de 0 "Not important at all" 10 "very important" 
. tab demo_imp_pre

demo_imp_pr |
       e _1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        192        5.90        5.90
          1 |         72        2.21        8.12
          2 |         96        2.95       11.07
          3 |        135        4.15       15.22
          4 |        107        3.29       18.51
          5 |        315        9.69       28.20
          6 |        196        6.03       34.23
          7 |        288        8.86       43.08
          8 |        514       15.81       58.89
          9 |        321        9.87       68.76
         10 |      1,016       31.24      100.00
------------+-----------------------------------
      Total |      3,252      100.00
r; t=0.00 14:33:34

. rename demo_imp_pre gendemoc_pre
r; t=0.00 14:33:34

. label var gendemoc_pre "gendemoc_pre"
r; t=0.00 14:33:34

. tab gendemoc_pre

gendemoc_pr |
          e |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        192        5.90        5.90
          1 |         72        2.21        8.12
          2 |         96        2.95       11.07
          3 |        135        4.15       15.22
          4 |        107        3.29       18.51
          5 |        315        9.69       28.20
          6 |        196        6.03       34.23
          7 |        288        8.86       43.08
          8 |        514       15.81       58.89
          9 |        321        9.87       68.76
         10 |      1,016       31.24      100.00
------------+-----------------------------------
      Total |      3,252      100.00
r; t=0.00 14:33:34

. 
. ** Political interest
. ta polint

    polint  |      Freq.     Percent        Cum.
------------+-----------------------------------
         -1 |        196        5.88        5.88
          0 |        647       19.42       25.30
          1 |        599       17.98       43.28
          2 |      1,135       34.06       77.34
          3 |        755       22.66      100.00
------------+-----------------------------------
      Total |      3,332      100.00
r; t=0.00 14:33:34

. *label def po 0 "Not at all interested" 1 "not very interested" 2 "somewhat interest" 3 "very interested" -1 "I don't 
> know"
. *label drop po
. *label val polint po
. fre polint

polint -- polint 
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        196       4.32       5.88       5.88
        0     |        647      14.26      19.42      25.30
        1     |        599      13.20      17.98      43.28
        2     |       1135      25.01      34.06      77.34
        3     |        755      16.64      22.66     100.00
        Total |       3332      73.42     100.00           
Missing .     |       1206      26.58                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. recode polint (-1=.)
(196 changes made to polint)
r; t=0.00 14:33:34

. tab polint, nolabel

    polint  |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        647       20.63       20.63
          1 |        599       19.10       39.73
          2 |      1,135       36.19       75.92
          3 |        755       24.08      100.00
------------+-----------------------------------
      Total |      3,136      100.00
r; t=0.00 14:33:34

. label var polint "Political interest"
r; t=0.00 14:33:34

. recode polint (0=0)(1=1)(2=2)(3=3),ge(polinter)
(0 differences between polint and polinter)
r; t=0.00 14:33:34

. ta polinter

  RECODE of |
     polint |
 (Political |
  interest) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        647       20.63       20.63
          1 |        599       19.10       39.73
          2 |      1,135       36.19       75.92
          3 |        755       24.08      100.00
------------+-----------------------------------
      Total |      3,136      100.00
r; t=0.00 14:33:34

. label var polinter "Political interest"
r; t=0.00 14:33:34

. 
. ** Turnout
. *If presidential elections were held tomorrow, how likely would you vote for the current president, Captain Ibrahim Tr
> aore?
. *label def 0 "Not Likely at all" 10 "Very likely"
. tab vote_intent_1

vote_intent |
         _1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         67        2.14        2.14
          1 |         23        0.73        2.87
          2 |         17        0.54        3.41
          3 |         30        0.96        4.37
          4 |         34        1.08        5.45
          5 |        118        3.76        9.21
          6 |         96        3.06       12.27
          7 |        131        4.17       16.44
          8 |        231        7.36       23.80
          9 |        277        8.83       32.63
         10 |      2,114       67.37      100.00
------------+-----------------------------------
      Total |      3,138      100.00
r; t=0.00 14:33:34

. rename vote_intent_1 vote_intent
r; t=0.00 14:33:34

. tab vote_intent

vote_intent |
         _1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         67        2.14        2.14
          1 |         23        0.73        2.87
          2 |         17        0.54        3.41
          3 |         30        0.96        4.37
          4 |         34        1.08        5.45
          5 |        118        3.76        9.21
          6 |         96        3.06       12.27
          7 |        131        4.17       16.44
          8 |        231        7.36       23.80
          9 |        277        8.83       32.63
         10 |      2,114       67.37      100.00
------------+-----------------------------------
      Total |      3,138      100.00
r; t=0.00 14:33:34

. label var vote_intent "Vote intention"
r; t=0.00 14:33:34

. 
. ** Safety in the community
. * label def 0 "Not at all safe" 10 "very safe"
. tab safe_community_1

Safe_commun |
      ity_1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         58        1.95        1.95
          1 |         45        1.51        3.47
          2 |         53        1.78        5.25
          3 |        127        4.27        9.53
          4 |        139        4.68       14.20
          5 |        289        9.73       23.93
          6 |        304       10.23       34.16
          7 |        407       13.70       47.86
          8 |        511       17.20       65.06
          9 |        296        9.96       75.03
         10 |        742       24.97      100.00
------------+-----------------------------------
      Total |      2,971      100.00
r; t=0.00 14:33:34

. rename safe_community_1 safe_community
r; t=0.00 14:33:34

. label var safe_community "Community safety"
r; t=0.00 14:33:34

. tab safe_community

  Community |
     safety |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         58        1.95        1.95
          1 |         45        1.51        3.47
          2 |         53        1.78        5.25
          3 |        127        4.27        9.53
          4 |        139        4.68       14.20
          5 |        289        9.73       23.93
          6 |        304       10.23       34.16
          7 |        407       13.70       47.86
          8 |        511       17.20       65.06
          9 |        296        9.96       75.03
         10 |        742       24.97      100.00
------------+-----------------------------------
      Total |      2,971      100.00
r; t=0.00 14:33:34

. 
. **  Emotions tratits
. tab1 emotion_traits_2 emotion_traits_3 emotion_traits_5

-> tabulation of emotion_traits_2  

emotion_tra |
      its_2 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        386       13.40       13.40
          1 |        150        5.21       18.61
          2 |        232        8.06       26.67
          3 |        242        8.40       35.07
          4 |        181        6.28       41.35
          5 |        302       10.49       51.84
          6 |        276        9.58       61.42
          7 |        305       10.59       72.01
          8 |        277        9.62       81.63
          9 |        152        5.28       86.91
         10 |        377       13.09      100.00
------------+-----------------------------------
      Total |      2,880      100.00

-> tabulation of emotion_traits_3  

emotion_tra |
      its_3 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        578       20.27       20.27
          1 |        282        9.89       30.16
          2 |        319       11.19       41.35
          3 |        330       11.57       52.93
          4 |        213        7.47       60.40
          5 |        263        9.22       69.62
          6 |        188        6.59       76.22
          7 |        182        6.38       82.60
          8 |        173        6.07       88.67
          9 |         84        2.95       91.62
         10 |        239        8.38      100.00
------------+-----------------------------------
      Total |      2,851      100.00

-> tabulation of emotion_traits_5  

emotion_tra |
      its_5 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         85        2.87        2.87
          1 |         47        1.59        4.46
          2 |         55        1.86        6.32
          3 |         80        2.70        9.03
          4 |         83        2.81       11.83
          5 |        210        7.10       18.93
          6 |        251        8.49       27.42
          7 |        323       10.92       38.34
          8 |        440       14.87       53.21
          9 |        354       11.97       65.18
         10 |      1,030       34.82      100.00
------------+-----------------------------------
      Total |      2,958      100.00
r; t=0.00 14:33:34

. rename emotion_traits_2 anxiety_traits
r; t=0.00 14:33:34

. label var anxiety_traits "anxiety traits"
r; t=0.00 14:33:34

. rename emotion_traits_3 anger_traits
r; t=0.00 14:33:34

. label var anger_traits "anger traits"
r; t=0.00 14:33:34

. rename emotion_traits_5 optimism_traits
r; t=0.00 14:33:34

. label var optimism_traits "Optimism traits"
r; t=0.00 14:33:34

. 
. tab1 anxiety anger  optimism

-> tabulation of anxiety_traits  

    anxiety |
     traits |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        386       13.40       13.40
          1 |        150        5.21       18.61
          2 |        232        8.06       26.67
          3 |        242        8.40       35.07
          4 |        181        6.28       41.35
          5 |        302       10.49       51.84
          6 |        276        9.58       61.42
          7 |        305       10.59       72.01
          8 |        277        9.62       81.63
          9 |        152        5.28       86.91
         10 |        377       13.09      100.00
------------+-----------------------------------
      Total |      2,880      100.00

-> tabulation of anger_traits  

      anger |
     traits |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        578       20.27       20.27
          1 |        282        9.89       30.16
          2 |        319       11.19       41.35
          3 |        330       11.57       52.93
          4 |        213        7.47       60.40
          5 |        263        9.22       69.62
          6 |        188        6.59       76.22
          7 |        182        6.38       82.60
          8 |        173        6.07       88.67
          9 |         84        2.95       91.62
         10 |        239        8.38      100.00
------------+-----------------------------------
      Total |      2,851      100.00

-> tabulation of optimism_traits  

   Optimism |
     traits |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         85        2.87        2.87
          1 |         47        1.59        4.46
          2 |         55        1.86        6.32
          3 |         80        2.70        9.03
          4 |         83        2.81       11.83
          5 |        210        7.10       18.93
          6 |        251        8.49       27.42
          7 |        323       10.92       38.34
          8 |        440       14.87       53.21
          9 |        354       11.97       65.18
         10 |      1,030       34.82      100.00
------------+-----------------------------------
      Total |      2,958      100.00
r; t=0.00 14:33:34

. su anxiety anger optimism

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
anxiety_tr~s |      2,880    5.110764    3.286571          0         10
anger_traits |      2,851    3.861452     3.21522          0         10
optimism_t~s |      2,958     7.62407    2.621673          0         10
r; t=0.00 14:33:34

. 
. 
. *Terrorisn affect
. fre terror_pers_*

terror_pers_1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        278       6.13      10.03      10.03
        1     |       1591      35.06      57.37      67.40
        2     |        904      19.92      32.60     100.00
        Total |       2773      61.11     100.00           
Missing .     |       1765      38.89                      
Total         |       4538     100.00                      
-----------------------------------------------------------

terror_pers_2
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        235       5.18       8.47       8.47
        1     |       1435      31.62      51.75      60.22
        2     |       1103      24.31      39.78     100.00
        Total |       2773      61.11     100.00           
Missing .     |       1765      38.89                      
Total         |       4538     100.00                      
-----------------------------------------------------------

terror_pers_3
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        201       4.43       7.27       7.27
        1     |        928      20.45      33.57      40.85
        2     |       1635      36.03      59.15     100.00
        Total |       2764      60.91     100.00           
Missing .     |       1774      39.09                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. recode terror_pers_1 (1=1 "yes")(2=0 "no")(-1=.), ge(terror_displaced)
(1,182 differences between terror_pers_1 and terror_displaced)
r; t=0.00 14:33:34

. label var terror_displaced "Take care of displaced persons"
r; t=0.00 14:33:34

. 
. recode terror_pers_2 (1=1 "yes")(2=0 "no")(-1=.), ge(terror_injured)
(1,338 differences between terror_pers_2 and terror_injured)
r; t=0.00 14:33:34

. ta  terror_injured

  RECODE of |
terror_pers |
         _2 |      Freq.     Percent        Cum.
------------+-----------------------------------
         no |      1,103       43.46       43.46
        yes |      1,435       56.54      100.00
------------+-----------------------------------
      Total |      2,538      100.00
r; t=0.00 14:33:34

. label var terror_injured "Being injured or having someone killed"
r; t=0.00 14:33:34

. 
. recode terror_pers_3 (1=1 "yes")(2=0 "no")(-1=.), ge(terror_home)
(1,836 differences between terror_pers_3 and terror_home)
r; t=0.00 14:33:34

. ta terror_home

  RECODE of |
terror_pers |
         _3 |      Freq.     Percent        Cum.
------------+-----------------------------------
         no |      1,635       63.79       63.79
        yes |        928       36.21      100.00
------------+-----------------------------------
      Total |      2,563      100.00
r; t=0.00 14:33:34

. label var terror_home "Leaving home due to terrorism"
r; t=0.00 14:33:34

. 
. *ta terror_exp
. *fre terror_*
. ge terror_exp=.
(4,538 missing values generated)
r; t=0.00 14:33:34

. replace terror_exp=0 if terror_displaced==0|terror_injured==0|terror_home==0
(1,980 real changes made)
r; t=0.00 14:33:34

. replace terror_exp=1 if terror_displaced==1|terror_injured==1|terror_home==1
(2,077 real changes made)
r; t=0.00 14:33:34

. fre terror_exp

terror_exp
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        635      13.99      23.41      23.41
        1     |       2077      45.77      76.59     100.00
        Total |       2712      59.76     100.00           
Missing .     |       1826      40.24                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. label var terror_exp "Lived experienced of terrorism"
r; t=0.00 14:33:34

. 
. egen terror_exp1=rowtotal(terror_displaced terror_injured terror_home)
r; t=0.00 14:33:34

. ta terror_exp1

terror_exp1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,461       54.23       54.23
          1 |        753       16.59       70.82
          2 |        771       16.99       87.81
          3 |        553       12.19      100.00
------------+-----------------------------------
      Total |      4,538      100.00
r; t=0.00 14:33:34

. 
. *--------------------------------------
. ** Treatment
. *--------------------------------------
. replace treatment="rights" if treatment=="terrorism"
(0 real changes made)
r; t=0.00 14:33:34

. tab treatment

        treatment |      Freq.     Percent        Cum.
------------------+-----------------------------------
          placebo |        707       25.06       25.06
           rights |        704       24.96       50.02
terrorism Burkina |        704       24.96       74.97
terrorism general |        706       25.03      100.00
------------------+-----------------------------------
            Total |      2,821      100.00
r; t=0.00 14:33:34

. tab treatment, nolabel

        treatment |      Freq.     Percent        Cum.
------------------+-----------------------------------
          placebo |        707       25.06       25.06
           rights |        704       24.96       50.02
terrorism Burkina |        704       24.96       74.97
terrorism general |        706       25.03      100.00
------------------+-----------------------------------
            Total |      2,821      100.00
r; t=0.00 14:33:34

. 
. gen treat =.
(4,538 missing values generated)
r; t=0.00 14:33:34

. replace treat = 0 if treatment == "placebo"
(707 real changes made)
r; t=0.00 14:33:34

. replace treat = 1 if treatment == "rights"
(704 real changes made)
r; t=0.00 14:33:34

. replace treat = 2 if treatment == "terrorism general"
(706 real changes made)
r; t=0.00 14:33:34

. replace treat = 3 if treatment == "terrorism Burkina"
(704 real changes made)
r; t=0.00 14:33:34

. 
. lab def treatlbl 0 "Placebo" 1 "Rights"  2 "Terrorism general" 3 "Terrorism Burkina"
r; t=0.00 14:33:34

. lab val treat treatlbl
r; t=0.00 14:33:34

. tab treat

            treat |      Freq.     Percent        Cum.
------------------+-----------------------------------
          Placebo |        707       25.06       25.06
           Rights |        704       24.96       50.02
Terrorism general |        706       25.03       75.04
Terrorism Burkina |        704       24.96      100.00
------------------+-----------------------------------
            Total |      2,821      100.00
r; t=0.00 14:33:34

. *tab treatment treat if attrition==0 & study=="main study"
. 
. * generate treatment pooled vs placebo
. codebook treat

------------------------------------------------------------------------------------------------------------------------
treat                                                                                                        (unlabeled)
------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (float)
                 Label: treatlbl

                 Range: [0,3]                         Units: 1
         Unique values: 4                         Missing .: 1,717/4,538

            Tabulation: Freq.   Numeric  Label
                          707         0  Placebo
                          704         1  Rights
                          706         2  Terrorism general
                          704         3  Terrorism Burkina
                        1,717         .  
r; t=0.01 14:33:34

. recode treat(1/3 =1)(0=0), ge(alltreat)
(1,410 differences between treat and alltreat)
r; t=0.00 14:33:34

. label var alltreat "Pooled treatments vs. Placebo"
r; t=0.00 14:33:34

. ta alltreat treat

    Pooled |
treatments |
       vs. |                    treat
   Placebo |   Placebo     Rights  Terrorism  Terrorism |     Total
-----------+--------------------------------------------+----------
         0 |       707          0          0          0 |       707 
         1 |         0        704        706        704 |     2,114 
-----------+--------------------------------------------+----------
     Total |       707        704        706        704 |     2,821 
r; t=0.00 14:33:34

. 
. * generate treatment righs vs. Placebo
. recode treat(1=1)(0 2 3 =0),ge(rights)
(1,410 differences between treat and rights)
r; t=0.00 14:33:34

. *generate treatment Burkina vs Placebo
. recode treat(3=1)(0 1 2 =0),ge(Bftreat)
(2,114 differences between treat and Bftreat)
r; t=0.00 14:33:34

. *generate treatment General vs Placebo
. recode treat(2=1)(0 1 3 =0),ge(gentreat)
(2,114 differences between treat and gentreat)
r; t=0.00 14:33:34

. ta treat rights

                  |    RECODE of treat
            treat |         0          1 |     Total
------------------+----------------------+----------
          Placebo |       707          0 |       707 
           Rights |         0        704 |       704 
Terrorism general |       706          0 |       706 
Terrorism Burkina |       704          0 |       704 
------------------+----------------------+----------
            Total |     2,117        704 |     2,821 
r; t=0.00 14:33:34

. ta treat Bftreat

                  |    RECODE of treat
            treat |         0          1 |     Total
------------------+----------------------+----------
          Placebo |       707          0 |       707 
           Rights |       704          0 |       704 
Terrorism general |       706          0 |       706 
Terrorism Burkina |         0        704 |       704 
------------------+----------------------+----------
            Total |     2,117        704 |     2,821 
r; t=0.00 14:33:34

. ta treat gentreat

                  |    RECODE of treat
            treat |         0          1 |     Total
------------------+----------------------+----------
          Placebo |       707          0 |       707 
           Rights |       704          0 |       704 
Terrorism general |         0        706 |       706 
Terrorism Burkina |       704          0 |       704 
------------------+----------------------+----------
            Total |     2,115        706 |     2,821 
r; t=0.00 14:33:34

. * Generate Burkna Faso treatment versus general terrorism treatment
. recode treat(3=1)(2=0)(0 1=.), ge(bfaso_g)
(2,821 differences between treat and bfaso_g)
r; t=0.00 14:33:34

. xi: fre i.bfaso_g
i.bfaso_g         _Ibfaso_g_0-1       (naturally coded; _Ibfaso_g_0 omitted)

_Ibfaso_g_1 -- bfaso_g==1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        706      15.56      50.07      50.07
        1     |        704      15.51      49.93     100.00
        Total |       1410      31.07     100.00           
Missing .     |       3128      68.93                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.01 14:33:34

. 
. * generate pooled terrorism treatment and rights versus placebo
. 
. codebook treat

------------------------------------------------------------------------------------------------------------------------
treat                                                                                                        (unlabeled)
------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (float)
                 Label: treatlbl

                 Range: [0,3]                         Units: 1
         Unique values: 4                         Missing .: 1,717/4,538

            Tabulation: Freq.   Numeric  Label
                          707         0  Placebo
                          704         1  Rights
                          706         2  Terrorism general
                          704         3  Terrorism Burkina
                        1,717         .  
r; t=0.00 14:33:34

. recode treat (0=0 "Placebo")(1=1 "rights") (2 3 =2 "terrorism_right"), ge(terrorism_right)
(704 differences between treat and terrorism_right)
r; t=0.00 14:33:34

. *label var terrorism_right "Pooled terrorism treatment and rights versus placebo"
. codebook terrorism_right

------------------------------------------------------------------------------------------------------------------------
terrorism_right                                                                                          RECODE of treat
------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (float)
                 Label: terrorism_right

                 Range: [0,2]                         Units: 1
         Unique values: 3                         Missing .: 1,717/4,538

            Tabulation: Freq.   Numeric  Label
                          707         0  Placebo
                          704         1  rights
                        1,410         2  terrorism_right
                        1,717         .  
r; t=0.00 14:33:34

. ****-----------------------------------------
. *Video infos
. fre video_infos

video_infos_1 -- video_infos _1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |         75       1.65       3.55       3.55
        1     |         25       0.55       1.18       4.74
        2     |         37       0.82       1.75       6.49
        3     |         41       0.90       1.94       8.44
        4     |         42       0.93       1.99      10.43
        5     |         93       2.05       4.41      14.83
        6     |        109       2.40       5.17      20.00
        7     |        185       4.08       8.77      28.77
        8     |        304       6.70      14.41      43.18
        9     |        280       6.17      13.27      56.45
        10    |        919      20.25      43.55     100.00
        Total |       2110      46.50     100.00           
Missing .     |       2428      53.50                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. label var video_infos "video informative"
r; t=0.00 14:33:34

. 
. * video_vicarious
. fre video_vicarious_1

video_vicarious_1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        132       2.91       6.28       6.28
        1     |         59       1.30       2.81       9.09
        2     |         74       1.63       3.52      12.61
        3     |         81       1.78       3.85      16.46
        4     |         88       1.94       4.19      20.65
        5     |        154       3.39       7.33      27.97
        6     |        181       3.99       8.61      36.58
        7     |        236       5.20      11.23      47.81
        8     |        362       7.98      17.22      65.03
        9     |        247       5.44      11.75      76.78
        10    |        488      10.75      23.22     100.00
        Total |       2102      46.32     100.00           
Missing .     |       2436      53.68                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. label var video_infos "video represent the country"
r; t=0.00 14:33:34

. rename video_vicarious_1 video_vicarious
r; t=0.00 14:33:34

. 
. *video_social
. fre video_social_1 

video_social_1 -- video_social _1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        121       2.67       5.74       5.74
        1     |         38       0.84       1.80       7.55
        2     |         64       1.41       3.04      10.58
        3     |         44       0.97       2.09      12.67
        4     |         61       1.34       2.90      15.57
        5     |        119       2.62       5.65      21.21
        6     |        142       3.13       6.74      27.95
        7     |        217       4.78      10.30      38.25
        8     |        312       6.88      14.81      53.06
        9     |        251       5.53      11.91      64.97
        10    |        738      16.26      35.03     100.00
        Total |       2107      46.43     100.00           
Missing .     |       2431      53.57                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. rename video_social_1 video_social
r; t=0.00 14:33:34

. label var video_social "Share video infos with others"
r; t=0.00 14:33:34

. 
. *video_control
. fre video_controls

video_controls
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   1     |        538      11.86      25.63      25.63
        2     |        343       7.56      16.34      41.97
        3     |        507      11.17      24.15      66.13
        4     |        711      15.67      33.87     100.00
        Total |       2099      46.25     100.00           
Missing .     |       2439      53.75                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. label def vd 1 "placebo" 2 "terro_general" 3 "terro_Burkina"  4 "right"
r; t=0.00 14:33:34

. label val video_controls vd
r; t=0.00 14:33:34

. 
. **** Outcomes
. 
. **  Future security
. * To what extent are you concerned about the terrorisme in Burkina Faso? 
. * from 0 "not concerned at all" to 10 "very much concerned"
. tab post_security_1

post_securi |
       ty_1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         27        1.31        1.31
          1 |          9        0.44        1.75
          2 |         22        1.07        2.82
          3 |         14        0.68        3.50
          4 |         19        0.92        4.43
          5 |         45        2.19        6.62
          6 |         70        3.41       10.02
          7 |        123        5.99       16.01
          8 |        220       10.71       26.72
          9 |        274       13.33       40.05
         10 |      1,232       59.95      100.00
------------+-----------------------------------
      Total |      2,055      100.00
r; t=0.00 14:33:34

. rename post_security_1 post_security
r; t=0.00 14:33:34

. ta post_security

post_securi |
         ty |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         27        1.31        1.31
          1 |          9        0.44        1.75
          2 |         22        1.07        2.82
          3 |         14        0.68        3.50
          4 |         19        0.92        4.43
          5 |         45        2.19        6.62
          6 |         70        3.41       10.02
          7 |        123        5.99       16.01
          8 |        220       10.71       26.72
          9 |        274       13.33       40.05
         10 |      1,232       59.95      100.00
------------+-----------------------------------
      Total |      2,055      100.00
r; t=0.00 14:33:34

. 
. ** Important democracy
. tab demo_imp_post_1

demo_imp_po |
       st_1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        108        5.38        5.38
          1 |         38        1.89        7.27
          2 |         58        2.89       10.16
          3 |         60        2.99       13.15
          4 |         60        2.99       16.14
          5 |        133        6.62       22.76
          6 |        101        5.03       27.79
          7 |        164        8.17       35.96
          8 |        297       14.79       50.75
          9 |        241       12.00       62.75
         10 |        748       37.25      100.00
------------+-----------------------------------
      Total |      2,008      100.00
r; t=0.00 14:33:34

. rename demo_imp_post_1 gendemoc_post
r; t=0.00 14:33:34

. tab gendemoc_post

gendemoc_po |
         st |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        108        5.38        5.38
          1 |         38        1.89        7.27
          2 |         58        2.89       10.16
          3 |         60        2.99       13.15
          4 |         60        2.99       16.14
          5 |        133        6.62       22.76
          6 |        101        5.03       27.79
          7 |        164        8.17       35.96
          8 |        297       14.79       50.75
          9 |        241       12.00       62.75
         10 |        748       37.25      100.00
------------+-----------------------------------
      Total |      2,008      100.00
r; t=0.00 14:33:34

. 
. * pre-post democartic attitudes
. gen democ_change = gendemoc_post - gendemoc_pre
(2,556 missing values generated)
r; t=0.00 14:33:34

. ta democ_change

democ_chang |
          e |      Freq.     Percent        Cum.
------------+-----------------------------------
        -10 |         11        0.55        0.55
         -9 |          3        0.15        0.71
         -8 |          4        0.20        0.91
         -7 |          7        0.35        1.26
         -6 |          8        0.40        1.66
         -5 |         18        0.91        2.57
         -4 |         27        1.36        3.94
         -3 |         60        3.03        6.96
         -2 |        100        5.05       12.01
         -1 |        178        8.98       20.99
          0 |        841       42.43       63.42
          1 |        278       14.03       77.45
          2 |        181        9.13       86.58
          3 |        100        5.05       91.62
          4 |         65        3.28       94.90
          5 |         42        2.12       97.02
          6 |         20        1.01       98.03
          7 |         16        0.81       98.84
          8 |          7        0.35       99.19
          9 |         10        0.50       99.70
         10 |          6        0.30      100.00
------------+-----------------------------------
      Total |      1,982      100.00
r; t=0.00 14:33:34

. 
. * Support for authoritarian alternatives
. fre authoritarianism_*

authoritarianism_1 -- authoritarianism  _1
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        131       2.89       6.84       6.84
        1     |        585      12.89      30.55      37.39
        2     |        348       7.67      18.17      55.56
        3     |        275       6.06      14.36      69.92
        4     |        219       4.83      11.44      81.36
        5     |        357       7.87      18.64     100.00
        Total |       1915      42.20     100.00           
Missing .     |       2623      57.80                      
Total         |       4538     100.00                      
-----------------------------------------------------------

authoritarianism_2 -- authoritarianism  _2
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |         77       1.70       4.02       4.02
        1     |        842      18.55      43.92      47.94
        2     |        464      10.22      24.20      72.14
        3     |        335       7.38      17.48      89.62
        4     |        103       2.27       5.37      94.99
        5     |         96       2.12       5.01     100.00
        Total |       1917      42.24     100.00           
Missing .     |       2621      57.76                      
Total         |       4538     100.00                      
-----------------------------------------------------------

authoritarianism_3 -- authoritarianism  _3
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        150       3.31       7.79       7.79
        1     |        348       7.67      18.07      25.86
        2     |        214       4.72      11.11      36.97
        3     |        301       6.63      15.63      52.60
        4     |        278       6.13      14.43      67.03
        5     |        635      13.99      32.97     100.00
        Total |       1926      42.44     100.00           
Missing .     |       2612      57.56                      
Total         |       4538     100.00                      
-----------------------------------------------------------

authoritarianism_4 -- authoritarianism  _4
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   -1    |        170       3.75       8.86       8.86
        1     |        257       5.66      13.40      22.26
        2     |        177       3.90       9.23      31.49
        3     |        277       6.10      14.44      45.93
        4     |        241       5.31      12.57      58.50
        5     |        796      17.54      41.50     100.00
        Total |       1918      42.27     100.00           
Missing .     |       2620      57.73                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. 
. label def au 1 "Very good" 2 "fairly good" 3 "neither good, nor bad" 4 "fairly bad" 5 "very bad"
r; t=0.00 14:33:34

. label val authoritarianism_* au
r; t=0.00 14:33:34

. 
. label var authoritarianism_1 "strong leader"
r; t=0.00 14:33:34

. label var authoritarianism_2 "military rule"
r; t=0.00 14:33:34

. label var authoritarianism_3 "One party rule"
r; t=0.00 14:33:34

. label var authoritarianism_4 "Charia rule"
r; t=0.00 14:33:34

. 
. 
. tab1 authoritarianism_1 authoritarianism_2 authoritarianism_3 authoritarianism_4

-> tabulation of authoritarianism_1  

        strong leader |      Freq.     Percent        Cum.
----------------------+-----------------------------------
                   -1 |        131        6.84        6.84
            Very good |        585       30.55       37.39
          fairly good |        348       18.17       55.56
neither good, nor bad |        275       14.36       69.92
           fairly bad |        219       11.44       81.36
             very bad |        357       18.64      100.00
----------------------+-----------------------------------
                Total |      1,915      100.00

-> tabulation of authoritarianism_2  

        military rule |      Freq.     Percent        Cum.
----------------------+-----------------------------------
                   -1 |         77        4.02        4.02
            Very good |        842       43.92       47.94
          fairly good |        464       24.20       72.14
neither good, nor bad |        335       17.48       89.62
           fairly bad |        103        5.37       94.99
             very bad |         96        5.01      100.00
----------------------+-----------------------------------
                Total |      1,917      100.00

-> tabulation of authoritarianism_3  

       One party rule |      Freq.     Percent        Cum.
----------------------+-----------------------------------
                   -1 |        150        7.79        7.79
            Very good |        348       18.07       25.86
          fairly good |        214       11.11       36.97
neither good, nor bad |        301       15.63       52.60
           fairly bad |        278       14.43       67.03
             very bad |        635       32.97      100.00
----------------------+-----------------------------------
                Total |      1,926      100.00

-> tabulation of authoritarianism_4  

          Charia rule |      Freq.     Percent        Cum.
----------------------+-----------------------------------
                   -1 |        170        8.86        8.86
            Very good |        257       13.40       22.26
          fairly good |        177        9.23       31.49
neither good, nor bad |        277       14.44       45.93
           fairly bad |        241       12.57       58.50
             very bad |        796       41.50      100.00
----------------------+-----------------------------------
                Total |      1,918      100.00
r; t=0.00 14:33:34

. recode authoritarianism_* (-1=.)
(131 changes made to authoritarianism_1)
(77 changes made to authoritarianism_2)
(150 changes made to authoritarianism_3)
(170 changes made to authoritarianism_4)
r; t=0.00 14:33:34

. 
. egen auth_support = rowmean(authoritarianism_1 authoritarianism_2 authoritarianism_3 authoritarianism_4)
(2,624 missing values generated)
r; t=0.00 14:33:34

. sum auth_support

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
auth_support |      1,914    2.865639    1.141885          1          5
r; t=0.00 14:33:34

. fre auth_support

auth_support
--------------------------------------------------------------
                 |      Freq.    Percent      Valid       Cum.
-----------------+--------------------------------------------
Valid   1        |        203       4.47      10.61      10.61
        1.25     |         42       0.93       2.19      12.80
        1.333333 |         11       0.24       0.57      13.38
        1.5      |         80       1.76       4.18      17.55
        1.666667 |         25       0.55       1.31      18.86
        1.75     |         58       1.28       3.03      21.89
        2        |        160       3.53       8.36      30.25
        2.25     |         93       2.05       4.86      35.11
        2.333333 |         24       0.53       1.25      36.36
        2.5      |         93       2.05       4.86      41.22
        2.666667 |         17       0.37       0.89      42.11
        2.75     |         98       2.16       5.12      47.23
        3        |        182       4.01       9.51      56.74
        3.25     |        121       2.67       6.32      63.06
        3.333333 |         18       0.40       0.94      64.00
        3.5      |        136       3.00       7.11      71.11
        3.666667 |         20       0.44       1.04      72.15
        3.75     |         96       2.12       5.02      77.17
        4        |        162       3.57       8.46      85.63
        4.25     |         85       1.87       4.44      90.07
        4.333333 |          6       0.13       0.31      90.39
        4.5      |         71       1.56       3.71      94.10
        4.666667 |          2       0.04       0.10      94.20
        4.75     |         35       0.77       1.83      96.03
        5        |         76       1.67       3.97     100.00
        Total    |       1914      42.18     100.00           
Missing .        |       2624      57.82                      
Total            |       4538     100.00                      
--------------------------------------------------------------
r; t=0.00 14:33:34

. lab var auth_support "Rejection of authoritarian alternatives"
r; t=0.00 14:33:34

. 
. * Policy priority
. fre priority_*

priority_1 -- priority _1
---------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
------------------+--------------------------------------------
Valid   0         |        136       3.00       7.67       7.67
        1         |          6       0.13       0.34       8.00
        2         |          1       0.02       0.06       8.06
        3         |          3       0.07       0.17       8.23
        4         |          1       0.02       0.06       8.29
        5         |          3       0.07       0.17       8.46
        7         |          2       0.04       0.11       8.57
        8         |          1       0.02       0.06       8.62
        9         |          2       0.04       0.11       8.74
        9.1466    |          1       0.02       0.06       8.79
        10        |          8       0.18       0.45       9.24
        19        |          1       0.02       0.06       9.30
        20        |         11       0.24       0.62       9.92
        24        |          1       0.02       0.06       9.98
        25        |          4       0.09       0.23      10.20
        30        |         11       0.24       0.62      10.82
        33        |          2       0.04       0.11      10.94
        35        |          2       0.04       0.11      11.05
        38        |          1       0.02       0.06      11.10
        40        |          9       0.20       0.51      11.61
        :         |          :          :          :          :
        1.000e+12 |          1       0.02       0.06      98.76
        5.000e+12 |          1       0.02       0.06      98.82
        3.000e+13 |          1       0.02       0.06      98.87
        5.000e+13 |          2       0.04       0.11      98.99
        1.000e+14 |          2       0.04       0.11      99.10
        1.099e+14 |          1       0.02       0.06      99.15
        1.100e+14 |          1       0.02       0.06      99.21
        5.000e+14 |          1       0.02       0.06      99.27
        5.000e+15 |          1       0.02       0.06      99.32
        5.000e+16 |          2       0.04       0.11      99.44
        1.000e+17 |          1       0.02       0.06      99.49
        9.530e+18 |          1       0.02       0.06      99.55
        1.000e+19 |          1       0.02       0.06      99.61
        1.235e+20 |          1       0.02       0.06      99.66
        1.800e+20 |          1       0.02       0.06      99.72
        1.000e+22 |          1       0.02       0.06      99.77
        4.009e+23 |          1       0.02       0.06      99.83
        5.000e+23 |          1       0.02       0.06      99.89
        4.000e+33 |          1       0.02       0.06      99.94
        9.000e+51 |          1       0.02       0.06     100.00
        Total     |       1774      39.09     100.00           
Missing .         |       2764      60.91                      
Total             |       4538     100.00                      
---------------------------------------------------------------

priority_2 -- priority _2
---------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
------------------+--------------------------------------------
Valid   0         |        250       5.51      14.19      14.19
        1         |         12       0.26       0.68      14.87
        2         |          7       0.15       0.40      15.27
        3         |          4       0.09       0.23      15.49
        4         |          1       0.02       0.06      15.55
        5         |         15       0.33       0.85      16.40
        6         |          2       0.04       0.11      16.52
        8         |          1       0.02       0.06      16.57
        10        |         57       1.26       3.23      19.81
        11        |          1       0.02       0.06      19.86
        12        |          3       0.07       0.17      20.03
        15        |          9       0.20       0.51      20.54
        20        |         43       0.95       2.44      22.99
        21        |          1       0.02       0.06      23.04
        25        |          9       0.20       0.51      23.55
        30        |          9       0.20       0.51      24.06
        40        |          6       0.13       0.34      24.40
        45        |          2       0.04       0.11      24.52
        50        |         87       1.92       4.94      29.46
        55        |          1       0.02       0.06      29.51
        :         |          :          :          :          :
        1.000e+11 |         18       0.40       1.02      97.62
        2.000e+11 |         11       0.24       0.62      98.24
        2.500e+11 |         10       0.22       0.57      98.81
        3.000e+11 |          4       0.09       0.23      99.04
        3.330e+11 |          1       0.02       0.06      99.09
        3.333e+11 |          1       0.02       0.06      99.15
        4.000e+11 |          1       0.02       0.06      99.21
        5.000e+11 |          2       0.04       0.11      99.32
        9.000e+11 |          1       0.02       0.06      99.38
        5.000e+12 |          1       0.02       0.06      99.43
        6.009e+13 |          1       0.02       0.06      99.49
        1.000e+16 |          1       0.02       0.06      99.55
        2.000e+16 |          1       0.02       0.06      99.60
        8.100e+20 |          1       0.02       0.06      99.66
        1.000e+22 |          1       0.02       0.06      99.72
        1.000e+24 |          1       0.02       0.06      99.77
        2.500e+26 |          1       0.02       0.06      99.83
        1.000e+29 |          1       0.02       0.06      99.89
        5.000e+34 |          1       0.02       0.06      99.94
        1.000e+41 |          1       0.02       0.06     100.00
        Total     |       1762      38.83     100.00           
Missing .         |       2776      61.17                      
Total             |       4538     100.00                      
---------------------------------------------------------------

priority_3 -- priority _3
---------------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
------------------+--------------------------------------------
Valid   0         |        148       3.26       8.37       8.37
        1         |          7       0.15       0.40       8.77
        2         |          1       0.02       0.06       8.82
        3         |          1       0.02       0.06       8.88
        4         |          1       0.02       0.06       8.94
        5         |          2       0.04       0.11       9.05
        7         |          2       0.04       0.11       9.16
        8         |          1       0.02       0.06       9.22
        8.5       |          1       0.02       0.06       9.28
        9         |          1       0.02       0.06       9.33
        10        |          4       0.09       0.23       9.56
        12        |          1       0.02       0.06       9.62
        13        |          1       0.02       0.06       9.67
        14        |          1       0.02       0.06       9.73
        20        |          5       0.11       0.28      10.01
        24        |          1       0.02       0.06      10.07
        25        |          4       0.09       0.23      10.29
        26        |          1       0.02       0.06      10.35
        27        |          1       0.02       0.06      10.41
        30        |         12       0.26       0.68      11.09
        :         |          :          :          :          :
        3.330e+13 |          1       0.02       0.06      98.93
        5.000e+13 |          1       0.02       0.06      98.98
        1.000e+14 |          1       0.02       0.06      99.04
        9.000e+14 |          1       0.02       0.06      99.10
        1.000e+15 |          1       0.02       0.06      99.15
        5.000e+15 |          1       0.02       0.06      99.21
        4.000e+16 |          1       0.02       0.06      99.26
        5.000e+16 |          1       0.02       0.06      99.32
        6.000e+16 |          1       0.02       0.06      99.38
        2.500e+17 |          1       0.02       0.06      99.43
        1.000e+18 |          1       0.02       0.06      99.49
        1.900e+19 |          1       0.02       0.06      99.55
        4.500e+19 |          1       0.02       0.06      99.60
        5.000e+19 |          1       0.02       0.06      99.66
        5.006e+19 |          1       0.02       0.06      99.72
        1.000e+21 |          1       0.02       0.06      99.77
        2.000e+22 |          1       0.02       0.06      99.83
        9.000e+27 |          1       0.02       0.06      99.89
        9.000e+28 |          1       0.02       0.06      99.94
        1.000e+39 |          1       0.02       0.06     100.00
        Total     |       1768      38.96     100.00           
Missing .         |       2770      61.04                      
Total             |       4538     100.00                      
---------------------------------------------------------------
r; t=0.01 14:33:34

. gen priority_weapon =.
(4,538 missing values generated)
r; t=0.00 14:33:34

. replace priority_weapon=priority_1 if priority_1 <=1000
(1,537 real changes made)
r; t=0.00 14:33:34

. label var priority_weapon "Buy more weapon"
r; t=0.00 14:33:34

. 
. gen priority_cohesion =.
(4,538 missing values generated)
r; t=0.00 14:33:34

. replace priority_cohesion=priority_2 if priority_2 <=1000
(1,573 real changes made)
r; t=0.00 14:33:34

. label var priority_cohesion "Social cohesion"
r; t=0.00 14:33:34

. 
. gen priority_job =.
(4,538 missing values generated)
r; t=0.00 14:33:34

. replace priority_job=priority_3 if priority_3 <=1000
(1,547 real changes made)
r; t=0.00 14:33:34

. label var priority_3 "Job creation"
r; t=0.00 14:33:34

. 
. tab1 priority_weapon priority_cohesion priority_job

-> tabulation of priority_weapon  

   Buy more |
     weapon |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        136        8.85        8.85
          1 |          6        0.39        9.24
          2 |          1        0.07        9.30
          3 |          3        0.20        9.50
          4 |          1        0.07        9.56
          5 |          3        0.20        9.76
          7 |          2        0.13        9.89
          8 |          1        0.07        9.95
          9 |          2        0.13       10.08
     9.1466 |          1        0.07       10.15
         10 |          8        0.52       10.67
         19 |          1        0.07       10.74
         20 |         11        0.72       11.45
         24 |          1        0.07       11.52
         25 |          4        0.26       11.78
         30 |         11        0.72       12.49
         33 |          2        0.13       12.62
         35 |          2        0.13       12.75
         38 |          1        0.07       12.82
         40 |          9        0.59       13.40
         43 |          1        0.07       13.47
         45 |          2        0.13       13.60
         47 |          1        0.07       13.66
         50 |         33        2.15       15.81
         56 |          1        0.07       15.88
         60 |          5        0.33       16.20
         70 |          1        0.07       16.27
         75 |          1        0.07       16.33
         80 |          6        0.39       16.72
         89 |          1        0.07       16.79
         90 |          1        0.07       16.85
         93 |          1        0.07       16.92
         99 |          1        0.07       16.98
        100 |         60        3.90       20.88
        110 |          1        0.07       20.95
        120 |          2        0.13       21.08
        125 |          1        0.07       21.15
        130 |          1        0.07       21.21
        150 |         10        0.65       21.86
        180 |          1        0.07       21.93
        200 |         73        4.75       26.68
        210 |          1        0.07       26.74
        220 |          1        0.07       26.81
        225 |          1        0.07       26.87
        240 |          1        0.07       26.94
        245 |          1        0.07       27.00
        250 |         65        4.23       31.23
        260 |          2        0.13       31.36
        280 |          1        0.07       31.42
        290 |          1        0.07       31.49
        295 |          1        0.07       31.55
        300 |        153        9.95       41.51
        325 |          1        0.07       41.57
        330 |          1        0.07       41.64
        333 |          2        0.13       41.77
        334 |          1        0.07       41.83
        345 |          1        0.07       41.90
        350 |         27        1.76       43.66
        375 |          2        0.13       43.79
        380 |          2        0.13       43.92
        390 |          2        0.13       44.05
        400 |        180       11.71       55.76
        440 |          1        0.07       55.82
        450 |         20        1.30       57.12
        470 |          1        0.07       57.19
        480 |          3        0.20       57.38
        490 |          7        0.46       57.84
        499 |          3        0.20       58.04
        500 |        412       26.81       84.84
        510 |          1        0.07       84.91
        550 |         18        1.17       86.08
        560 |          1        0.07       86.14
        570 |          1        0.07       86.21
        580 |          1        0.07       86.27
        590 |          1        0.07       86.34
        600 |         66        4.29       90.63
        605 |          1        0.07       90.70
        650 |          7        0.46       91.15
     666.67 |          1        0.07       91.22
        680 |          1        0.07       91.28
        690 |          1        0.07       91.35
        700 |         35        2.28       93.62
        750 |          2        0.13       93.75
        780 |          1        0.07       93.82
        800 |         22        1.43       95.25
        850 |          4        0.26       95.51
        895 |          1        0.07       95.58
        900 |          7        0.46       96.03
        940 |          1        0.07       96.10
        980 |          1        0.07       96.16
       1000 |         59        3.84      100.00
------------+-----------------------------------
      Total |      1,537      100.00

-> tabulation of priority_cohesion  

     Social |
   cohesion |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        250       15.89       15.89
          1 |         12        0.76       16.66
          2 |          7        0.45       17.10
          3 |          4        0.25       17.36
          4 |          1        0.06       17.42
          5 |         15        0.95       18.37
          6 |          2        0.13       18.50
          8 |          1        0.06       18.56
         10 |         57        3.62       22.19
         11 |          1        0.06       22.25
         12 |          3        0.19       22.44
         15 |          9        0.57       23.01
         20 |         43        2.73       25.75
         21 |          1        0.06       25.81
         25 |          9        0.57       26.38
         30 |          9        0.57       26.95
         40 |          6        0.38       27.34
         45 |          2        0.13       27.46
         50 |         87        5.53       32.99
         55 |          1        0.06       33.06
         60 |          6        0.38       33.44
         70 |          3        0.19       33.63
         75 |          2        0.13       33.76
         80 |          2        0.13       33.88
         90 |          3        0.19       34.08
        100 |        350       22.25       56.33
        120 |          3        0.19       56.52
        125 |          2        0.13       56.64
        129 |          1        0.06       56.71
        130 |          2        0.13       56.83
        140 |          2        0.13       56.96
        150 |         73        4.64       61.60
        152 |          1        0.06       61.67
        160 |          1        0.06       61.73
        175 |          1        0.06       61.79
        190 |          1        0.06       61.86
        200 |        292       18.56       80.42
        220 |          2        0.13       80.55
        225 |          1        0.06       80.61
        240 |          1        0.06       80.67
        250 |        120        7.63       88.30
        290 |          1        0.06       88.37
        300 |         88        5.59       93.96
        333 |          2        0.13       94.09
        346 |          1        0.06       94.15
        350 |          6        0.38       94.53
        399 |          1        0.06       94.60
        400 |         23        1.46       96.06
        450 |          2        0.13       96.19
        500 |         21        1.34       97.52
        550 |          1        0.06       97.58
        560 |          1        0.06       97.65
        600 |          2        0.13       97.77
        610 |          1        0.06       97.84
        700 |          3        0.19       98.03
        800 |          1        0.06       98.09
        900 |          1        0.06       98.16
       1000 |         29        1.84      100.00
------------+-----------------------------------
      Total |      1,573      100.00

-> tabulation of priority_job  

priority_jo |
          b |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        148        9.57        9.57
          1 |          7        0.45       10.02
          2 |          1        0.06       10.08
          3 |          1        0.06       10.15
          4 |          1        0.06       10.21
          5 |          2        0.13       10.34
          7 |          2        0.13       10.47
          8 |          1        0.06       10.54
        8.5 |          1        0.06       10.60
          9 |          1        0.06       10.67
         10 |          4        0.26       10.92
         12 |          1        0.06       10.99
         13 |          1        0.06       11.05
         14 |          1        0.06       11.12
         20 |          5        0.32       11.44
         24 |          1        0.06       11.51
         25 |          4        0.26       11.76
         26 |          1        0.06       11.83
         27 |          1        0.06       11.89
         30 |         12        0.78       12.67
         32 |          1        0.06       12.73
         35 |          3        0.19       12.93
         40 |          9        0.58       13.51
         42 |          1        0.06       13.57
         45 |          1        0.06       13.64
         50 |         23        1.49       15.13
         55 |          2        0.13       15.26
         60 |          5        0.32       15.58
         65 |          1        0.06       15.64
         70 |          7        0.45       16.10
         75 |          1        0.06       16.16
         80 |          6        0.39       16.55
         90 |          2        0.13       16.68
         99 |          1        0.06       16.74
        100 |         41        2.65       19.39
        120 |          1        0.06       19.46
        130 |          1        0.06       19.52
        140 |          1        0.06       19.59
        150 |          8        0.52       20.10
        160 |          1        0.06       20.17
        175 |          1        0.06       20.23
        190 |          1        0.06       20.30
        198 |          1        0.06       20.36
        200 |         62        4.01       24.37
        250 |         67        4.33       28.70
        290 |          2        0.13       28.83
        295 |          1        0.06       28.89
        298 |          1        0.06       28.96
        300 |        194       12.54       41.50
        310 |          1        0.06       41.56
        330 |          1        0.06       41.63
        333 |          1        0.06       41.69
     333.33 |          1        0.06       41.76
        334 |          1        0.06       41.82
        340 |          1        0.06       41.89
        345 |          1        0.06       41.95
        346 |          1        0.06       42.02
        350 |         60        3.88       45.90
        357 |          1        0.06       45.96
        360 |          1        0.06       46.02
        375 |          1        0.06       46.09
        380 |          1        0.06       46.15
        390 |          2        0.13       46.28
        398 |          1        0.06       46.35
        400 |        206       13.32       59.66
        430 |          1        0.06       59.73
        440 |          2        0.13       59.86
        445 |          1        0.06       59.92
        450 |         35        2.26       62.18
        480 |          5        0.32       62.51
        485 |          1        0.06       62.57
        490 |          2        0.13       62.70
        495 |          2        0.13       62.83
        499 |          1        0.06       62.90
        500 |        325       21.01       83.90
        525 |          1        0.06       83.97
        530 |          1        0.06       84.03
        540 |          1        0.06       84.10
        550 |         11        0.71       84.81
        560 |          3        0.19       85.00
        590 |          1        0.06       85.07
        599 |          1        0.06       85.13
        600 |         86        5.56       90.69
        650 |          3        0.19       90.89
        660 |          1        0.06       90.95
        670 |          1        0.06       91.01
        675 |          1        0.06       91.08
        690 |          1        0.06       91.14
        695 |          1        0.06       91.21
        700 |         33        2.13       93.34
        710 |          1        0.06       93.41
        747 |          1        0.06       93.47
        750 |          6        0.39       93.86
        800 |         24        1.55       95.41
        850 |          5        0.32       95.73
        890 |          1        0.06       95.80
        900 |          8        0.52       96.32
        950 |          1        0.06       96.38
        971 |          1        0.06       96.44
        990 |          1        0.06       96.51
        999 |          4        0.26       96.77
       1000 |         50        3.23      100.00
------------+-----------------------------------
      Total |      1,547      100.00
r; t=0.00 14:33:34

. 
. *Policy preference
. label var policy_ademoc_1 "Vote for democratic policy"
r; t=0.00 14:33:34

. rename policy_ademoc_1 democ_po
r; t=0.00 14:33:34

. fre democ_po

democ_po -- Vote for democratic policy
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        258       5.69      13.25      13.25
        1     |         68       1.50       3.49      16.74
        2     |         84       1.85       4.31      21.06
        3     |         92       2.03       4.73      25.78
        4     |        105       2.31       5.39      31.18
        5     |        107       2.36       5.50      36.67
        6     |         41       0.90       2.11      38.78
        7     |         86       1.90       4.42      43.19
        8     |        137       3.02       7.04      50.23
        9     |        165       3.64       8.47      58.71
        10    |        804      17.72      41.29     100.00
        Total |       1947      42.90     100.00           
Missing .     |       2591      57.10                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. *reversed code
. recode democ_po(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0), ge(democ_policy)
(1,840 differences between democ_po and democ_policy)
r; t=0.00 14:33:34

. fre democ_policy

democ_policy -- RECODE of democ_po (Vote for democratic policy)
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        804      17.72      41.29      41.29
        1     |        165       3.64       8.47      49.77
        2     |        137       3.02       7.04      56.81
        3     |         86       1.90       4.42      61.22
        4     |         41       0.90       2.11      63.33
        5     |        107       2.36       5.50      68.82
        6     |        105       2.31       5.39      74.22
        7     |         92       2.03       4.73      78.94
        8     |         84       1.85       4.31      83.26
        9     |         68       1.50       3.49      86.75
        10    |        258       5.69      13.25     100.00
        Total |       1947      42.90     100.00           
Missing .     |       2591      57.10                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. 
. * Donation task
. label var donation_1 "Donation to democracy"
r; t=0.00 14:33:34

. rename donation_1 donation
r; t=0.00 14:33:34

. su donation

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
    donation |      1,885    40.82653    31.69794          0        120
r; t=0.00 14:33:34

. 
. * Demonstration for democracy***
. 
. label var demonstrat_democracy_1 "Demonstration for democracy"
r; t=0.00 14:33:34

. rename  demonstrat_democracy_1 demonstrat_democracy
r; t=0.00 14:33:34

. fre demonstrat_democracy

demonstrat_democracy -- Demonstration for democracy
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        238       5.24      12.34      12.34
        1     |         71       1.56       3.68      16.03
        2     |         96       2.12       4.98      21.01
        3     |        125       2.75       6.48      27.49
        4     |        119       2.62       6.17      33.66
        5     |        151       3.33       7.83      41.49
        6     |        156       3.44       8.09      49.59
        7     |        216       4.76      11.20      60.79
        8     |        210       4.63      10.89      71.68
        9     |        150       3.31       7.78      79.46
        10    |        396       8.73      20.54     100.00
        Total |       1928      42.49     100.00           
Missing .     |       2610      57.51                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. 
. * Democratic advantage in fighting terrorism***
. 
. label var q99_1 "Democratic advantage"
r; t=0.00 14:33:34

. rename  q99_1 terrorism_regime
r; t=0.00 14:33:34

. fre terrorism_regime

terrorism_regime -- Democratic advantage
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   0     |        172       3.79       9.87       9.87
        1     |         75       1.65       4.30      14.17
        2     |         97       2.14       5.57      19.74
        3     |        125       2.75       7.17      26.91
        4     |         87       1.92       4.99      31.90
        5     |        126       2.78       7.23      39.13
        6     |        131       2.89       7.52      46.64
        7     |        169       3.72       9.70      56.34
        8     |        216       4.76      12.39      68.73
        9     |        149       3.28       8.55      77.28
        10    |        396       8.73      22.72     100.00
        Total |       1743      38.41     100.00           
Missing .     |       2795      61.59                      
Total         |       4538     100.00                      
-----------------------------------------------------------
r; t=0.00 14:33:34

. 
. gen attrition  = 0
r; t=0.00 14:33:34

. replace attrition=1 if gendemoc_post==. & auth_support==. &  democ_policy==. & terrorism_regime==. & demonstrat_democr
> acy==. & donation==. & post_security==. & priority_weapon ==. &  priority_cohesion ==. &  priority_job ==. 
(2,463 real changes made)
r; t=0.00 14:33:34

. 
. tab attrition 

  attrition |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,075       45.72       45.72
          1 |      2,463       54.28      100.00
------------+-----------------------------------
      Total |      4,538      100.00
r; t=0.00 14:33:34

. **
. save "${data}/BFdata.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BFdata.dta saved
r; t=0.03 14:33:34

. 
. /****************************************************************************************
> SECTION 1 — Import and prepare Burkina Faso geolocation reference (cities → coordinates)
> ****************************************************************************************/
. 
. * Import city-level geolocation reference (lat/lon, province, etc.)
. import excel "${data}/BF_location.xlsx", sheet("data") firstrow clear
(4 vars, 76 obs)
r; t=0.10 14:33:34

. save "${data}/BF_location.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BF_location.dta saved
r; t=0.01 14:33:34

. 
. 
. /****************************************************************************************
> SECTION 2 — Merge survey data with geolocation: attach coordinates to survey cities
> ****************************************************************************************/
. 
. use "${data}/BFdata.dta", clear
r; t=0.00 14:33:34

. gen id_A = _n
r; t=0.00 14:33:34

. order id_A
r; t=0.00 14:33:34

. sort id_A
r; t=0.00 14:33:34

. 
. * Merge geolocation onto survey records (by city name)
. merge m:1 city using "${data}/BF_location.dta", keep(master match) force

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,579
        from master                     1,579  (_merge==1)
        from using                          0  (_merge==2)

    Matched                             2,959  (_merge==3)
    -----------------------------------------
r; t=0.13 14:33:34

. save "${data}/BF_merged.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BF_merged.dta saved
r; t=0.03 14:33:34

. 
. 
. /****************************************************************************************
> SECTION 3 — Import terrorism events data (2022) and prepare for spatial matching
> ****************************************************************************************/
. 
. import excel "${data}/BF1_2022.xlsx", sheet("Sheet1") firstrow clear
(6 vars, 425 obs)
r; t=0.17 14:33:34

. save "${data}/BF1_2022.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BF1_2022.dta saved
r; t=0.00 14:33:34

. 
. 
. /****************************************************************************************
> SECTION 4 — Spatial match: link each survey location to nearby terrorism events (≤200 km)
> ****************************************************************************************/
. 
. use "${data}/BF_merged.dta", clear
r; t=0.00 14:33:34

. order id_A
r; t=0.00 14:33:34

. sort id_A
r; t=0.00 14:33:34

. 
. * Identify all events within 200km of each survey location (geonear output = all matches)
. geonear id_A lat lng using "${data}/BF1_2022.dta", ///
>     n(id_B latitude longitude) long within(200) near(0)

-------------------------------------------------------------------------------
Unique base locations   = 2,959          Unique neighbor locations = 425       
Bases * Neighbors  (M)  = 1.3            Number of regions         = 100       
Computed distances      = 401,713        Total run time (seconds)  = 3.418
-------------------------------------------------------------------------------
r; t=3.43 14:33:38

. 
. save "${data}/BF_geonear.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BF_geonear.dta saved
r; t=0.07 14:33:38

. 
. 
. /****************************************************************************************
> SECTION 5 — Construct analysis file: keep closest event per respondent (nearest-neighbour)
> ****************************************************************************************/
. 
. use "${data}/BF_merged.dta", clear
r; t=0.00 14:33:38

. 
. * Attach distance-to-event table (one-to-many: each id_A may match multiple events)
. merge 1:m id_A using "${data}/BF_geonear", keep(master match) keepusing(id_B km_to_id_B) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,579
        from master                     1,579  
        from using                          0  

    Matched                           393,093  
    -----------------------------------------
r; t=0.15 14:33:38

. 
. * Bring in event attributes (id_B → terrorism event variables)
. merge m:1 id_B using "${data}/BF1_2022.dta", keep(master match) nogen force

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,579
        from master                     1,579  
        from using                          0  

    Matched                           393,093  
    -----------------------------------------
r; t=2.16 14:33:40

. 
. * Sort so that within each respondent, the closest event comes first
. sort id_A km_to_id_B id_B
r; t=0.11 14:33:40

. by id_A: gen one = (_n == 1)
r; t=0.03 14:33:40

. 
. * Sanity check: number of retained respondents after nearest-neighbour selection
. count if one
  4,538
r; t=0.02 14:33:40

. 
. order city city_ascii lat lng id_A latitude longitude province_1 province_2 q37
r; t=0.09 14:33:40

. save "${data}/BF_merge.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BF_merge.dta saved
r; t=2.69 14:33:43

. 
. * Keep only the closest event match per respondent
. keep if one == 1
(390,134 observations deleted)
r; t=0.04 14:33:43

. save "${data}/BFdata.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/BFdata.dta saved
r; t=0.03 14:33:43

. order id_A km_to_id_B one
r; t=0.00 14:33:43

. 
. 
. /****************************************************************************************
> SECTION 6 — Distance bands and descriptive checks (proximity distribution)
> ****************************************************************************************/
. 
. capture drop km50
r; t=0.00 14:33:43

. egen km50 = cut(km_to_id_B), at(0,50,160)
(1,579 missing values generated)
r; t=0.00 14:33:43

. 
. tabstat km_to_id_B, by(km50) stats(N mean min max)

Summary for variables: km_to_id_B
Group variable: km50 

    km50 |         N      Mean       Min       Max
---------+----------------------------------------
       0 |      1035  32.02298   .015504  49.30092
      50 |      1924  106.6599  53.94388  154.8379
---------+----------------------------------------
   Total |      2959  80.55338   .015504  154.8379
--------------------------------------------------
r; t=0.00 14:33:43

. 
. tab km50, gen(dist_)

       km50 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,035       34.98       34.98
         50 |      1,924       65.02      100.00
------------+-----------------------------------
      Total |      2,959      100.00
r; t=0.00 14:33:43

. summ dist_*

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      dist_1 |      2,959    .3497803    .4769811          0          1
      dist_2 |      2,959    .6502197    .4769811          0          1
r; t=0.00 14:33:43

. tab dist_1

     km50== |
     0.0000 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,924       65.02       65.02
          1 |      1,035       34.98      100.00
------------+-----------------------------------
      Total |      2,959      100.00
r; t=0.00 14:33:43

. 
. 
. /****************************************************************************************
> SECTION 7 — Post-stratification setup: demographic groups and urban/rural (capital proxy)
> ****************************************************************************************/
. 
. * Age groups
. tab age

        age |      Freq.     Percent        Cum.
------------+-----------------------------------
         18 |        151        4.04        4.04
         19 |        187        5.00        9.04
         20 |        256        6.85       15.89
         21 |        194        5.19       21.08
         22 |        253        6.77       27.84
         23 |        197        5.27       33.11
         24 |        228        6.10       39.21
         25 |        193        5.16       44.37
         26 |        170        4.55       48.92
         27 |        155        4.15       53.06
         28 |        130        3.48       56.54
         29 |        121        3.24       59.78
         30 |        142        3.80       63.57
         31 |         89        2.38       65.95
         32 |         82        2.19       68.15
         33 |         65        1.74       69.88
         34 |         70        1.87       71.76
         35 |         71        1.90       73.66
         36 |         48        1.28       74.94
         37 |         56        1.50       76.44
         38 |         55        1.47       77.91
         39 |         48        1.28       79.19
         40 |         62        1.66       80.85
         41 |         29        0.78       81.63
         42 |         56        1.50       83.12
         43 |         39        1.04       84.17
         44 |         41        1.10       85.26
         45 |         43        1.15       86.41
         46 |         52        1.39       87.80
         47 |         39        1.04       88.85
         48 |         16        0.43       89.28
         49 |         32        0.86       90.13
         50 |         46        1.23       91.36
         51 |         20        0.53       91.90
         52 |         41        1.10       92.99
         53 |         14        0.37       93.37
         54 |         17        0.45       93.82
         55 |         22        0.59       94.41
         56 |         21        0.56       94.97
         57 |         21        0.56       95.53
         58 |         14        0.37       95.91
         59 |         12        0.32       96.23
         60 |         20        0.53       96.76
         61 |          8        0.21       96.98
         62 |         19        0.51       97.49
         63 |         13        0.35       97.83
         64 |         13        0.35       98.18
         65 |         14        0.37       98.56
         66 |          5        0.13       98.69
         67 |          5        0.13       98.82
         68 |          7        0.19       99.01
         69 |          3        0.08       99.09
         70 |          5        0.13       99.22
         71 |          1        0.03       99.25
         72 |          4        0.11       99.36
         73 |          2        0.05       99.41
         74 |          3        0.08       99.49
         75 |          1        0.03       99.52
         76 |          2        0.05       99.57
         77 |          2        0.05       99.63
         85 |          1        0.03       99.65
         88 |          1        0.03       99.68
         93 |          1        0.03       99.71
         96 |          1        0.03       99.73
         97 |          1        0.03       99.76
         98 |          1        0.03       99.79
         99 |          8        0.21      100.00
------------+-----------------------------------
      Total |      3,739      100.00
r; t=0.00 14:33:43

. recode age (18/25=1 "18-25") (26/35=2 "26-35") (36/103=3 "36 and above"), gen(age_grp)
(3,739 differences between age and age_grp)
r; t=0.00 14:33:43

. tab age_grp

   RECODE of |
   age (age) |      Freq.     Percent        Cum.
-------------+-----------------------------------
       18-25 |      1,659       44.37       44.37
       26-35 |      1,095       29.29       73.66
36 and above |        985       26.34      100.00
-------------+-----------------------------------
       Total |      3,739      100.00
r; t=0.00 14:33:43

. label var age_grp "Age group"
r; t=0.00 14:33:43

. 
. * Capital region indicator (Ouagadougou vs other provinces)
. gen cap_region = (province_2 == "Ouagadougou")
r; t=0.00 14:33:43

. tab cap_region if attrition == 0

 cap_region |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,001       48.24       48.24
          1 |      1,074       51.76      100.00
------------+-----------------------------------
      Total |      2,075      100.00
r; t=0.00 14:33:43

. 
. label var female "Gender"
r; t=0.00 14:33:43

. rename _merge _merge_old
r; t=0.00 14:33:43

. 
. 
. /****************************************************************************************
> SECTION 8 — Post-stratification cells: group name + group id (age × gender × region)
> ****************************************************************************************/
. 
. gen groupname = "middle_female_rural" if age_grp==2 & female==1 & cap_region==0
(4,374 missing values generated)
r; t=0.00 14:33:43

. replace groupname = "middle_female_urban" if age_grp==2 & female==1 & cap_region==1
(223 real changes made)
r; t=0.00 14:33:43

. replace groupname = "middle_male_rural"   if age_grp==2 & female==0 & cap_region==0
(369 real changes made)
r; t=0.00 14:33:43

. replace groupname = "middle_male_urban"   if age_grp==2 & female==0 & cap_region==1
(299 real changes made)
r; t=0.00 14:33:43

. 
. replace groupname = "old_female_rural" if age_grp==3 & female==1 & cap_region==0
(111 real changes made)
r; t=0.00 14:33:43

. replace groupname = "old_female_urban" if age_grp==3 & female==1 & cap_region==1
(216 real changes made)
r; t=0.00 14:33:43

. replace groupname = "old_male_rural"   if age_grp==3 & female==0 & cap_region==0
(291 real changes made)
r; t=0.00 14:33:43

. replace groupname = "old_male_urban"   if age_grp==3 & female==0 & cap_region==1
(324 real changes made)
r; t=0.00 14:33:43

. 
. replace groupname = "young_female_rural" if age_grp==1 & female==1 & cap_region==0
(302 real changes made)
r; t=0.00 14:33:43

. replace groupname = "young_female_urban" if age_grp==1 & female==1 & cap_region==1
(208 real changes made)
r; t=0.00 14:33:43

. replace groupname = "young_male_rural"   if age_grp==1 & female==0 & cap_region==0
(688 real changes made)
r; t=0.00 14:33:43

. replace groupname = "young_male_urban"   if age_grp==1 & female==0 & cap_region==1
(395 real changes made)
r; t=0.00 14:33:43

. 
. gen groupid = .
(4,538 missing values generated)
r; t=0.00 14:33:43

. replace groupid = 1  if groupname=="young_female_rural"
(302 real changes made)
r; t=0.00 14:33:43

. replace groupid = 2  if groupname=="middle_female_rural"
(164 real changes made)
r; t=0.00 14:33:43

. replace groupid = 3  if groupname=="old_female_rural"
(111 real changes made)
r; t=0.00 14:33:43

. replace groupid = 4  if groupname=="young_male_rural"
(688 real changes made)
r; t=0.00 14:33:43

. replace groupid = 5  if groupname=="middle_male_rural"
(369 real changes made)
r; t=0.00 14:33:43

. replace groupid = 6  if groupname=="old_male_rural"
(291 real changes made)
r; t=0.00 14:33:43

. replace groupid = 7  if groupname=="young_female_urban"
(208 real changes made)
r; t=0.00 14:33:43

. replace groupid = 8  if groupname=="middle_female_urban"
(223 real changes made)
r; t=0.00 14:33:43

. replace groupid = 9  if groupname=="old_female_urban"
(216 real changes made)
r; t=0.00 14:33:43

. replace groupid = 10 if groupname=="young_male_urban"
(395 real changes made)
r; t=0.00 14:33:43

. replace groupid = 11 if groupname=="middle_male_urban"
(299 real changes made)
r; t=0.00 14:33:43

. replace groupid = 12 if groupname=="old_male_urban"
(324 real changes made)
r; t=0.00 14:33:43

. 
. 
. /****************************************************************************************
> SECTION 9 — Merge population margins and generate post-stratification weights
> ****************************************************************************************/
. 
. * Merge population proportions (quota) by post-stratification cell
. merge m:1 groupid using "${data}/population data.dta"

    Result                      Number of obs
    -----------------------------------------
    Not matched                           948
        from master                       948  (_merge==1)
        from using                          0  (_merge==2)

    Matched                             3,590  (_merge==3)
    -----------------------------------------
r; t=0.01 14:33:43

. 
. gen base_weight = 1
r; t=0.00 14:33:43

. * ssc install survwgt
. survwgt post base_weight, by(groupid) totvar(quota) generate(weight)
r; t=0.00 14:33:43

.  * Data for analysis
.    
.  * generate data for age group (18-24, 25-34, 36 and above)
. 
. 
. table (age_grp female)(cap_region) 

---------------------------------------
               |        cap_region     
               |      0       1   Total
---------------+-----------------------
Age group      |                       
  18-25        |                       
    Gender     |                       
      male     |    688     395   1,083
      female   |    302     208     510
      Total    |    990     603   1,593
  26-35        |                       
    Gender     |                       
      male     |    369     299     668
      female   |    164     223     387
      Total    |    533     522   1,055
  36 and above |                       
    Gender     |                       
      male     |    291     324     615
      female   |    111     216     327
      Total    |    402     540     942
  Total        |                       
    Gender     |                       
      male     |  1,348   1,018   2,366
      female   |    577     647   1,224
      Total    |  1,925   1,665   3,590
---------------------------------------
r; t=0.10 14:33:43

. table (age_grp female)(cap_region) [aweight=weight]

-------------------------------------
               |       cap_region    
               |      0     1   Total
---------------+---------------------
Age group      |                     
  18-25        |                     
    Gender     |                     
      male     |    190    48     238
      female   |    194    35     229
      Total    |    384    83     467
  26-35        |                     
    Gender     |                     
      male     |    179    40     219
      female   |    236    55     291
      Total    |    415    95     510
  36 and above |                     
    Gender     |                     
      male     |    442    86     528
      female   |    388   108     496
      Total    |    830   194   1,024
  Total        |                     
    Gender     |                     
      male     |    811   174     985
      female   |    818   198   1,016
      Total    |  1,629   372   2,001
-------------------------------------
r; t=0.03 14:33:43

. table (age_grp female)(cap_region) if attrition==0  

-------------------------------------
               |       cap_region    
               |    0       1   Total
---------------+---------------------
Age group      |                     
  18-25        |                     
    Gender     |                     
      male     |  345     236     581
      female   |  133     136     269
      Total    |  478     372     850
  26-35        |                     
    Gender     |                     
      male     |  197     198     395
      female   |   75     136     211
      Total    |  272     334     606
  36 and above |                     
    Gender     |                     
      male     |  165     196     361
      female   |   51     136     187
      Total    |  216     332     548
  Total        |                     
    Gender     |                     
      male     |  707     630   1,337
      female   |  259     408     667
      Total    |  966   1,038   2,004
-------------------------------------
r; t=0.02 14:33:43

. 
. save "${data}/finaldata.dta", replace
file /Users/souleymane.yameogo/Library/CloudStorage/Dropbox/WP3_OnlineCivics/Conflict
    project/Analysis/Video_Analysis/Replication data - PSRM/data/finaldata.dta saved
r; t=0.01 14:33:43

. 
end of do-file

r; t=10.30 14:33:43
